Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
i want to change the display the text of the secondary links from normal to
Link «
but there seem to be encoding problems, as the system makes « to «
according to the Rewriting Primary Links posting, i created a template.tpl.php with the following code
function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
foreach (array('primary', 'secondary') as $type) {
//Get the data to populate the textfields, if the variable is not an array .. try to parse the old-style link format.
$value = variable_get('phptemplate_' . $type . '_links', ”);
//Get the amount of links to show, possibly expanding if there are more links defined than the count specifies.
$count = variable_get('phptemplate_' . $type . '_link_count', 5);
$count = ($count > sizeof($value['link'])) ? $count : sizeof($value['link']);
if (theme_get_setting('toggle_' . $type . '_links')) {
for ($i =0; $i < $count; $i++) {
unset($attributes);
if (!empty($value['text'][$i])) {
if (!empty($value['description'][$i])) {
$attributes['title'] = $value['description'][$i];
}
if ($type == 'secondary') {
$value['text'][$i] .= ' «';
}
$links[$type][] = l($value['text'][$i], $value['link'][$i], $attributes);
$vars[$type . '_links'] = $links[$type];
}
}
}
}
return $vars;
}
}
is there a way to prevent drupal from converting the ampersand & to & ?
I am trying to pull the comment submission form inside of the content of my page. However, PHPTemplate doesn't seem to have this level of granularity. As far as I can tell the content of my page and my comment form is embeded within the $content variable. Digging around in the comment.module shows me that there are theme_ functions for various parts of the comment mechanism but nothing like page.tpl.php where I could move the HTML that output the comment form up into a different part of my page.
Thhe following break occurs with phptemplate and any compatible theme on Tiger:
Fatal error: phptemplate_init(): Failed opening required '' (include_path='.:/usr/lib/php') in ./themes/engines/phptemplate/phptemplate.engine on line 55
The only clue I have yet is this may be due to Tiger PHP being built with a MySQL client API < 4.1.x.
How do I pass variables from a module to phptemplate?
I read topic Making additional variables available to your templates, created 'template.php'. I tried to add new variable and assign it some value from module hook (i need sections_in_section()). But it doesn't work, it says 'no such function defined'.
Am I stupid or it's not possible? Please, help me. Thanks in advance.
The primary/secondary links could replace the links above the search bar there. Instead of the ads on the right side, you could have the links and blocks, and the search results could be replaced with the news items/nodes.
This would be great for news sites, imo.
I can start on this, but I'm wondering what theme would be the best starting point?