| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 1 month |
| seen | Apr 12 '12 at 14:34 | |
| stats | profile views | 3 |
|
May 3 |
awarded | Teacher |
|
Apr 30 |
awarded | Student |
|
Apr 6 |
answered | How to add an icon before (or after) the node title if a field is filled? |
|
Apr 5 |
comment |
How to add an icon before (or after) the node title if a field is filled?function fourlegged_omega_alpha_preprocess_page(&$variables) {
if (isset($variables['node']) && $variables['node']->type == 'entry') {
if($variables['node']->field_entry_fav) {
//print_r($variables['node']->title);
$titleFile = 'ic-favourite.png';
$titleImage = base_path() . path_to_theme() . "/images/" . $titleFile;
$newTitle = ' <img alt="' . $variables['node']->title . '" src="' . $titleImage . '" />' . $variables['node']->title;
$variables['node']->title = $newTitle;
}
}
} |
|
Apr 5 |
comment |
How to add an icon before (or after) the node title if a field is filled? OK tried but not success. Apparently the title generated was not the title coming from the node.tpl.php, but coming from page.tpl.php. Is the preprocess function will apply to the page template, instead of the node template? Oh by the way, I'm using a template based on Omega. |
|
Apr 5 |
asked | How to add an icon before (or after) the node title if a field is filled? |