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

Doren Berge’s picture

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.

Ars’s picture

Thank you! This is exactly the fix I was looking for. I appreciate the help!

~ Ars

mark@redhorseinteractive.com’s picture

That's very thoughtful and kind instruction. Precise! Thanks!

mwaqasaziz’s picture

if i only want to change it for specific node but not for all, please help

markconroy’s picture

Might be a bit late now, but you can create a tpl file for just one node.

  1. Copy node.tpl.php from the /modules folder
  2. Place it in your theme folder
  3. Rename it to node--NID.tpl.php (where NID is equal to the number of the node you wish to do this for, so /node/123 will be node--123.tpl.php)
  4. Start editing your file.
  5. Clear your cache.
  6. Eat cake.

============

Drupal Core Maintainer for "Out of the Box" Initiative.