Closed (fixed)
Project:
PHPTemplate
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
18 Jan 2005 at 19:19 UTC
Updated:
23 Feb 2005 at 20:16 UTC
On certain themes one might wish to display the date the node was submitted on with a different format.
So far I've managed to this by hacking the PHPTemplate engine, with something like this:
if (theme_get_setting('toggle_node_info_' . $node->type)) {
$vars['submitted'] = t('Submitted by %a on %b.', array('%a' => format_name($node), '%b' => format_date($node->created)));
// Adding this line to the original phptemplate.engine
$vars['myDateFormat'] = format_date($node->created, 'custom', 'F d, Y');
}
However it'd be really nice if PHPTemplate offered a way to do this on a theme-per-theme basis, without the need of hacks.
Comments
Comment #1
adrian commentedThis should be a feature of the theme system itself, not PHPTemplate.
There is nothing stopping you from using
directly in your template, instead of passing the variable to the template.
Comment #2
(not verified) commented