Hello!
Please bear with my total newbie question. Apologies in advance. I'm new to Drupal and PhP. I'm using Drupal 7, fresh install, marinelli theme.
I would like to remove the URL link in the node title.
I have read the documentation and several similar posts for removing the href link in the title of a node, but the marinelli node.tpl.php varies so much (in my humble php experience) from the similar code snippets that I'm having trouble deciphering the marinelli version of the code.
Is this change accommodated from the node.tpl.php file? I can find no href reference and am beginning to suspect that I may be looking in the wrong file.
I have tried to remove various lines of code, but the changes have been to style and appearance and have kept the link in tact.
Thank you for your help!
Comments
Node titles are linked when
Node titles are linked when the node is displayed in summary mode. Like a list of post summaries on a Front page. Or a list of post summaries under a taxonomy term, content type, like a blog. I'll go out on a limb and assume you dont want the headline on your home page Welcome message to link to the *Node* of the Welcome message... or something like that.
Whatever your circumstance,.. Marinelli has a "node--teaser.tpl.php" located in "Marinelli > templates folder" that manages the teaser display. You can hack this and it will take care of the Node Title links. But it may limit your display options in other instances. I don't know your specifics.
Open "node--teaser.tpl.php"
You will notice the instructions at the top for making custom teasers for specific content types. This might apply to your situation. If you do this be sure to clear your Drupal Cache after creating it.
If you want to change all of your teaser Title displays edit the "node--teaser.tpl.php" (As usual, best to make a copy to roll back to.)
To remove the title link change line #13:
<?php print l($title, 'node/'.$nid, array('html'=>TRUE)); ?>Change it to:
<?php print ($title); ?>Hope this helps.
Removing Links from Node Titles
Thank you! This is exactly the fix I was looking for. I appreciate the help!
~ Ars
That's very thoughtful and
That's very thoughtful and kind instruction. Precise! Thanks!
need help
if i only want to change it for specific node but not for all, please help
Might be a bit late now, but
Might be a bit late now, but you can create a tpl file for just one node.
============
Drupal Core Maintainer for "Out of the Box" Initiative.