Good day:
I would like to disable the default behavior
of my page-top site-name,
so that it is no longer a hyperlink.
I assume this is not acheive-able using CSS.
Please; What file, and what line do I need to change/add?
Thanking you in advance for your attention, time, and help.
: o )
-chris
Comments
The easiest way to remove the
The easiest way to remove the hyperlink is modifying your theme (page.tpl.php). Depending the theme you installed you will see something like:
You can change it to:
Remove Site-name hyperlink-capability
@josedanielestrada:
Thank you very much for your reply and help. Your suggestion above has helped me to easily get the results I desired.
Your solution, however, removed the hyperlink-capability for the "Logo", whereas I wanted the hyperlink-capability removed from the "Site-name". Lucky for me, when I mimicked and applied your suggestion as follows, I got exactly what I wanted.
Thanks again, my friend.
===
To remove the hyper-link-capability of the Drupal 7 site-name
[Edited - 2015.02.03]
The following example was done using the theme
"Zen-7.x-3.3", but applies equally to "Zen-7.x-3.2"
since the page.tpl.php file is identical in both versions.
The location of the file "page.tpl.php"
varies from theme to theme.
The 'Zen base-theme' "page.tpl.php" file location is:
[D7-root]/sites/all/themes/zen/templates/page.tpl.php
If your sub-theme has its own "page.tpl.php" file,
then that is the file that is actively being used;
and the base-theme "page.tpl.php" file is ignored.
id="site-name"]
<!--" and "-->" (comment tags) to comment-out the following code:<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home">and also comment-out the code:
</a>This is what it should look like:
Navigate to the 'Performance' page.
Click the button "Clear all caches".
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
Great! :)
Great! :)
Just to correct something in
Just to correct something in the above post.
You do not need to 'Visit you Drupal 7 "Appearance" page so that the changes will take effect' when editing the page.tpl.php file. This is only necessary when editing the .info file.
@ mikeaja
@ mikeaja
Thank you for having taken time to correct my original instructions.
I have edited my instructions above, and, among other things, I removed the 'Visit Appearance page' instructions.
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
Mystery: Sitename link removal working on some but not all pages
We have a Bartik-based site with 5 tabbed sections, one of which is Home. We want to remove link behavior from the Site Name, as well as logo, on all pages. The above-suggested modification of page.tpl.php accomplishes that for 2 of the 5 pages (Home and a Main Content page), but not for the other 3 sections/pages. Those include Book-module formatted pages but also a page that's just a contact form. We considered looking into node--book.tpl.php" but found no similar code there to modify. (nothing that seems to relate to "site-name" or "site_name")
Is there a way to verify what template a particular page is using? Does anyone have a suggestion for how to remove the sitename link in a more universal way? --Thanks--