


Making a REST AJAX call from Basic Page
The following successfully calls a REST Services Module endpoint when contained in a module but I cannot get it to work within the script tags of a basic page. (function ($) { var myapi = { ‘apiPath’: ‘/api/award’ }; // REST functions.... read more
Why computed field is not getting displayed while creating content
I using “computed field” Module. I have installed the 7.x-1.0-beta1 version computed field module. Enabled and save the configuration. I have created a computed field and just displayed “Hello” in my content type “abc”. But this... read more
What token can I use for the taxonomy hierarchy?
I have a vocabulary with 3 levels and a content type with a term reference to that vocabulary. When I create a node of that type, I choose a term in the deepest level of the vocabulary. I installed the Pathauto module and I’d like to use... read more
different templates for print and deafult version of the node
I’ve faced with a problem of differentiating node templates for print-version (I’m using “print” module) and default node’s default template. I have a <div> which should be present in node–node_type.tpl.php but not in... read more
hook_form_alter to limit user select list to those referenced in a node
I have a content type called Project. I am linking users to this content type through several user reference fields. I am also creating related Events (another content type) related to the Project content type pages through the Node Reference URL Widget. So far so... read more
Results of a Views display as an array
With Views in D6, I was able to get the results of a Views display as an array and work with it using php code embedded in a node. For example, using this code snippet: $view = views_get_view(‘view_name’, 1); $view->set_display(‘block_1’);... read more
How to extend TableSort class
I have a paged table that extends the TableSort class. The thing is, I would like to add some special parameters to the header links, so I need to extend the TableSort class. The problem is, it is not recognizing my new extended TableSort (MyTableSort) class. This is... read more
RSS not appearing in meta tag
An RSS-feed on my site doesn’t show up in the HTML <head> as it is supposed to, which makes it very difficult to find. Here’s my situation: A view is displaying the latest blog posts. This view has two displays: a content pane and a feed. The feed is... read more
Custom ‘Who’s Online’ View – How to filter User View by whether logged in
I have a User View that is trying to replicate the ‘who’s online’ block. It currently has 3 filters: A custom user_profile field (Must be False) User: Active (Yes) User: Current (Yes) For some reason the filter works on when using the first two but... read more
Failure getting nodes from terms via the rest api
I have added a REST web service in Drupal and all content is tagged with taxonomy. I’m now trying to acquire all related nodes to the terms. First I’m calling taxonomy_vocabulary/getTree along with the vid and I’ll get all the terms for a specific... read more
How to use an external jQuery plugin with Drupal’s no-conflict jQuery
I’m using drupal_add_js() to load some external js: drupal_add_js(‘http://jquery-accordion.googlecode.com/svn/trunk/jquery.accordion.js’, ‘external’); This produces ‘TypeError: $ is not a function’ errors because Drupal uses... read more
caching views based on arguments as taxonomy term id
Hi need to enable caching based on taxonomy term id from the url which the views takes as an argument 1)simple cache returns empty results 2)views_arg_cache module also empty 3)views_content_cache module aslo empty please help if any body has tried such scenario and... read more
Changing SQL JOIN type via PHP in Views
How do I change the JOIN type in a SQL query that Views creates? For example, in this code <?php function eb_mine_views_query_alter(&$view, &$query) { if ($view->name == ‘statuser’) { dsm($query, ‘before’);... read more
How to fix "This display does not have a source for contextual filters"
I’ve set up a view to produce a block of content nodes based on taxonomy. I have the filter criteria to include Has Taxonomy term (not empty). Then under advanced I added a contextual filter ‘Has Taxonomy Term ID’. But when I set it up (or edit it)... read more
How to print a Panel Page?
I am using the Print module. I have enabled the node/%node template in panels and used a selection rule to select my specific node type and added fields into the panels regions etc. That all works fine. I need to be able to use the Print module to see a print-friendly... read more
Always show next page link in pager
function mythemename_pager_next($text, $limit, $element = 0, $interval = 1, $parameters = array()) { global $pager_page_array, $pager_total; $output = ”; // If we are anywhere but the last page if ($pager_page_array[$element] < ($pager_total[$element] –... read more
How to find the right token to use in a rule for sending an email to the node author?
I am having the toughest time figuring out how to send an email to the node author. I created my rule and everything works if I hard code the email but I can’t seem to get the right token to use and it seems the tokens available only allow:[node:author] nothing... read more
It’s a way to select by default N/A checkbox
I want that if a fields is not mandatory the N/A options on select box is ticked by default. I have tried to tick default value N/A on the field but after the setting disappear. I use Drupal 7.15. Cordially read more