Posted by asak on January 10, 2009 at 3:24pm
Jump to:
| Project: | Session Favorites |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
The demo site shows a cool block at the header, which updates according to the number of flagged items.
Would be nice to have this block as defaultv (or im a just missing it?) .
For now, is there a simple php block which i could create for the same effect?
Thanks.
Comments
#1
Hey asak,
Unfortunately, on that sight, the header functionality was added in at the last moment, via the theme layer instead of the preferred block method. I think a block would definitely be the way to go.
In the mean time though, this is the code used in template.php to define a new variable for page.tpl.php:
<?phpif (module_exists('session_favorites') && session_favorites_available()) {
// Can't Miss functionality
$favs = count(session_favorites_get_list());
$vars['cant_miss_list'] = l(t('My Can\'t-Miss List'),variable_get('session_favorites_path', 'session-favorites')) . t(' (@items added)', array('@items' => $favs . ' ' . format_plural($favs, 'item', 'items')));
}
?>
If, in the process of using this, you get a block into the module, I would gladly apply the patch.