


Add header and footer for every pages printed
I’ve used print module version 7.x-2.0. I’ve used pdf-version and print-friendly-version. Now i want to do two different things. That is, Is it possible to add separate CSS for pdf, html or email templates like: print-pdf.css, print-html.css,... read more
preprocess_field() not working – what am I doing wrong?
I am trying to use mytheme_preprocess_field() to alter how a field is displayed. Here is the code I added to my theme’s template.php: function creative_responsive_theme_preprocess_field(&$vars) { $element = &$vars[‘element’]; if... read more
How to send an email once every 6 months using the Rules module?
How to send an email once in every 6 months at 12:00 am for a date field about user renewal which is there in user profile using the Rules module? Its mail should send in cyclic form every once in 6 months to notify user, repeating the mail once in 6 months. So far I... read more
How do I enable CkEditor for a textarea form element?
I have a custom form and the following textarea element. $form[‘fieldset’][’email_template’] = array( ‘#type’ => ‘textarea’, ‘#title’ => t(‘E-mail template content’),... read more
Use the value of node author’s field as CSS class
I have a user profile field which gets populated by the Rules module. I want to add that value to the body class of nodes that user creates. Which hook should I use to achieve this? What code do I exactly need? read more
How to fetch/load a node form using jquery/ajax?
In my previous question, I asked on how to fetch views blocks, now I would like to do the same with the node form but somehow this is the code that almost worked for me: setTimeout(function(){ $(‘.custom-form’).load(‘?q=node/add/custom... read more
How to alter node body content through Views pre render hook?
I have build the view to display node title and node body also I have applied combined fields filter which searches the keyword in title and body and returns the results. While rendering the contents I have to render the title and body with the highlighted keywords... read more
Children of children not appearing in book navigation menu
UPDATE: I should mention that this is concerning the Book Navigation Block I’m using the book module to display children of a book in a side menu. It displays the title of the book and it’s children just fine. However the children of the children... read more
Is it possible to get the last number of a views pager to display after and before the elipses?
I’m trying to create a custom pager similar to the Amazon pager: < 1 2 3 4 … 82 > and after a certain point: < 1 … 7 8 9 10 … 82 > But, I cant figure out how to display the last pager number after the elipse. Is this possible? What... read more
Pop-up calendar option does not display when I add Date field in webform
I am using Date and Calendar module. When I add a component to webform, I selected the Date field > click Add. But I do not see the Pop-up calendar option. However, when I add a content type (structure > Add content > I see the Pop-up calendar option display... read more
is it possible to have multiple access callback for a menu item
I am trying to add access callback to already existing access callback for a menu item. For eg, path = [node/nid/edit] with access callback ‘AC1’. Now is it possible for us to add another access callback to the existing AC1? I am thinking of hook menu... read more
How do I loop over result rows and return calculated values?
I cannot get proper results from View PHP field. I’ve set up a Flipped Table view of entity form submission of which I’m trying to calculate “results” (sum and count(for avg)) with following code $results = array(); // For results $static =... read more
styling submit form button for mobile
I have styling done for the submit form buttons on web, and when i maually resize my browser, the stying stays the same in smaller widths. But, when i videw on my Iphone 6, the stying looks like default drupal button. Is there something is the base theme Bartik that... read more
Add an enddate to my date field programmatically
I’m using the date field contrib module and added it to my custom module which creates a content type and its fields. I’ve successfully added a field(+instance) of date with a popupcalendar to my contenttype with a lot of help of this comment. But I... read more