Print current base language in tpl.php

Print current base language in tpl.php

I statically added a link to /cart on the page.tpl.php template file. Since it’s a multi language website, the link doesn’t always work. How do I print a link that consider the currently used language? read more
Print current base language in tpl.php

ajaxify content via a callback function

I am trying to ajaxify my site. I want the “Main page content” to be passed via an ajax-command to a custom js-function. To accomplish this I would do the following: I need to register a path for my ajax requests code: $items[‘_custom_ajax_’] =... read more
Print current base language in tpl.php

How to limit a user to one vote when using Rate module?

In Drupal 7, I have installed the Rate module for voting. But here, the user can change his vote anytime he wants. If I want to restrict an user to vote for a particular node only once, what I have to do? read more
Print current base language in tpl.php

How to make a custom block listen to context module?

I’ve been creating my own module that consist an array of blocks. I plan to print them using context as oppose programatically as I already have the module on use (no need to reinvent the wheel). However, whenever I use context to display a block on a region, it... read more
Print current base language in tpl.php

emailing users in user reference field with rules

I am working on a site for an academic conference. Right now, we have two content types (1) proposal and (2) peer review. In the proposal content type, an author can add multiple presenters to a user reference field. When the node is saved, I have a rule that loops... read more
Print current base language in tpl.php

Encoding and decoding in Views

I have a view that accepts a contexual filter.When I pass a value through contextual filter like view/sometext ,it is passed directly without encoding.I need to encode it in the url and decode it before processing it in the view.How can I achieve this? read more
Print current base language in tpl.php

Link tags in template file auto closing.

I’m having an issue wrapping a link around some output in a template file. I have the right template file; and I can put text like ‘start here’ and ‘end here’ and it prints out where I want the ‘a href’ tag to start and end. However when I put in the starting ‘a href’... read more
Print current base language in tpl.php

Webform capability issue with Chosen

The Chosen module no longer get applied to Webform select fields with the most recent updates to a Drupal Commerce 2.0 site that I am working on. I am using Chosen version 7.x-2.0-beta4+1-dev (part of Commerce Core) and Webform version 7.x-4.0-beta1. After further... read more
Print current base language in tpl.php

How do I change the front page?

In commerce guys demos store I toggled off the main menu in commerce kickstart template and have enabled the main menu block to stay on sidebar first block. I want to get a vertical main menu instead of a horizontal one like the demo store default installation.... read more
Print current base language in tpl.php

Node Form Not submitting on ctool modal

I have a custom form, on submission of which I am calling ctools modal with a node form(content type: turn). Code for Custom Form. function _my_module_name_files_listing_form($form, &$form_state) { $form = array();... read more
Print current base language in tpl.php

How can I serve a separate CSS file for Internet Explorer?

I am setting responsive design for only IE (Internet Explorer) in Drupal 7. Is there any method or solution this file is working with only IE not for Firefox and Chrome? read more
Print current base language in tpl.php

Form validate without submit action

I’m developing a site that it will use Services for the CRUD operations and ANGULARJS for the comunication frontend <-> backend. Now when I want to insert a new content of content type FOO I will don’t use the standard form (node/add/FOO), but one of... read more
Print current base language in tpl.php

Can "Demonstrate block regions" use a specific template?

The theme .info file look like this. name = xxx description = xxxxx core = 7.x engine = phptemplate stylesheets[all][] = css/css.css regions[banner] = Banner regions[header] = Header regions[leftcolumn] = Left Column regions[content] = Content Column... read more
Print current base language in tpl.php

Show all events that are active between two dates chosen from exposed date filter

I have a problem in showing views results with an exposed date filter in D7 views 3.x. problem We have several events with a date field. It is required to fill in a start and end date. We want a visitor to choose a start date and an end date with an exposed filter in... read more
Print current base language in tpl.php

View with multiple value fields: suppress display of repeated column values

My content type has two fields: field_title and field_related. The field_related is of type Entity Reference and its cardinality is set to unlimited. The view should display the title, updated date and all related titles, in tabular form, like this: Title Updated... read more
Print current base language in tpl.php

Custom line item types without a product reference field

Let me start by saying I am aware of this module: https://www.drupal.org/project/commerce_custom_product This module works great for custom line item types that need to reference a product, however (correct me if I am wrong) this module can’t be used to create... read more
Print current base language in tpl.php

Commerce Product Collection View Block: What Determines CSS For Each Header Link?

In Kickstart 2 there is a view called collection_products which displays a list of products in a given collection, grouped by category. There is a header which uses a Block display to give anchor links to each Category Header on the page. The format of the fields is... read more
Print current base language in tpl.php

How to add markup inside a form radio button div

Currently I have a form displaying radio buttons and I added some markup to it by attaching #suffix to the form element. However, I found that this didn’t do exactly what I needed. This created the following code structure: <div... read more
Print current base language in tpl.php

How to show an Inline Entity Form on a PM page or panel?

I’m trying to include an Inline Entity Form on a panels display (via ctools Page Manager). The Inline Entity Form field is attached to users, and the page in question has the user’s context. The Inline Entity Form field does appear in the panels interface,... read more
Print current base language in tpl.php

Is it possible to get Entity Connect and Entity Reference View Widget to work together and if so how?

It seems to me this should be a fairly common problem, but I can’t seem to find and answer despite looking! Here is my use case: I have two types of content: Activity and Participants. When I create a new Activity I want to be able to add multiple Participants... read more