By pollyplummer on
My theme (Celju) comes with this template.php file:
<?php
// Celju -- $Id: template.php,v 1.1.4.1 2008/01/10 01:53:44 jwolf Exp $
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' :: ', $breadcrumb) .'</div>';
}
}
/**
* Different Node Templates by Node Variables (nid, type, view)
* http://chapterthreellc.com/blog/zirafa/different_node_templates_node_variables_nid_type_view
*/
function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'node':
if ($vars['page']) {
$vars['template_files'] = array('node-default-page', 'node-'. $vars['node']->type .'-page', 'node-'. $vars['node']->nid .'-page');
}
else {
$vars['template_files'] = array('node-'. $vars['node']->nid);
}
break;
}
return $vars;
}
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $type = null) {
static $node_type;
if (isset($type)) $node_type = $type;
if (!$content || $node_type == 'forum') {
return '<div id="comments">'. $content . '</div>';
}
else {
return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
}
}
/**
* Fix TinyMCE
* removes grey sidebars in text area
*/
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name) {
if (isset($init)) {
switch ($theme_name) {
case 'advanced':
$init['width'] = '100%';
break;
}
}
return $init;
}I want to remove the home link but all the suggestions I have found in the forums have caused issues... such as it removes the link but makes the rest of the text on the page node into a block of linked text. Does anyone know what I can do to simply remove the links and have all the content remain the same?
Comments
removed Breadcrumb
Open the page.tpl.php
search for
print breadcrumbmake it
//print breadcrumbYes, but....
Thank you, the links are removed. However, when I do this it makes my page node into a big link. Whereas it is a paragraph of regular black text prior to removing breadcrumbs, afterwards it turns into a block of linked text leading to "http://www.sitename/home#" Any thoughts why removing the links would make my page node into a link instead?
"Two things a man cannot hide: that he is drunk, and that he is in love."
-Playwright Antiphanes
Static page as default front page
Maybe it's not the fact of the breadcrumb being removed that is causing the problem. When I set my specific page node to be the default front page, it makes all the text on the page into a link. When it's just a regular node, it appears normal. Is this a separate issue from the breadcrumb issue? I'm beginning to think that removing the breadcrumbs might not be the source of the problem.
"Two things a man cannot hide: that he is drunk, and that he is in love."
-Playwright Antiphanes
It sounds like you have an
It sounds like you have an open
a hreftag somewhere on the page, probably in that node you are setting to be the front page (no closing tag</a>). Removing the breadcrumbs normally would not do this, but it's possible something in the breadcrumbs was closing the open anchor for you (people remove the breadcrumbs all the time from other themes with no problem). I'd suggest carefully checking the preceding HTML, back-tracing until you come to the spot with an open tag. Does it happen when you set other nodes to the front page or just a particular one? If it's with all nodes, look into the node.tpl.php template file to see if anything is amiss in there. Also try temporarily renaming template.php so it won't be used - if the problem goes away that narrows it down to something in that file.-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]
Thank you!!
Yes! That was exactly it! I guess I was stressing over the breadcrumbs so much that I didnt imagine it could be something so simple as an open a href tag! So sleepy, been up all night... thanks for your help!
"Two things a man cannot hide: that he is drunk, and that he is in love."
-Playwright Antiphanes