Closed (fixed)
Project:
Session Favorites
Version:
5.x-1.4
Component:
Documentation
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2009 at 15:20 UTC
Updated:
15 Jun 2009 at 18:50 UTC
Hi, I've been trying to get the module to work but I'm having trouble with it.
I've created the "add to" link as described on this page (http://drupal.org/node/344830), and code reads:
else {
$link = l(t('Add to can\'t miss list'), variable_get('session_favorites_path', 'session-favorites') . '/add/' . $vars['node']->nid, array('title' => t('Add @title to my can\'t miss list', array('@title' => $vars['node']->title)), 'class' => 'cant-miss-add-link'), drupal_get_destination());
}
$vars['cant_miss_link'] = $link;
}
echo $vars['cant_miss_link'];
Which generates a link such as
<a class="cant-miss-add-link" title="Add to my can't miss list" href="/CURRENT/mysite/session-favorites/add/?destination=node%2F3">Add to can't miss list</a>
When I click on the link however, there is no error message generated and the node is not added to the list. Am I missing something?
Comments
Comment #1
porcelaindev commentedI managed to solve this one, the problem I had was with $vars['node']->nid, I just had to use $node->nid instead.