Howdy,

I'd like to conditionally show a line of text in a particular page (node) only if the user is looking at the full node display. (The summary on the front page will not show this line of text)

It seems the best way to do this is to check $teaser, is that correct? I'm thinking some conditional php code like:

if (!$teaser) {
 echo "<Text and Html I want only on full node view>";
}

Does this make sense?

Gracias.

rob

Comments

jetsetter’s picture

Any thoughts on this?

dnguyen’s picture

What I did was created a tpl file. So for my "Photo" content-type, I created a node-photo.tpl.php...

For stuff I wanted to show in the full view, I put it under this if statement:
if($page)

For teasers, I put the display commands under:
if($page==0)

jetsetter’s picture

Hello,

I haven't gotten a response on this, so maybe I should rephrase the question:

I would like to make it so that the first image in a node summary is hyperlinked to the URL for the actual story. (the same URL the title link goes to.) This is my ultimate goal with changing the node summary.

I typically include a nice 150px wide image floated to the left or right of each of my content items, so making the images in each summary link to the full article makes it easier for users to jump into content.

Thanks for any help or ideas.

rob

jetsetter’s picture

I'm going to give this thread one more shot then call it:

Can someone please suggest a method for adding conditions for the display of a node's template based on if the content is being shown as a teaser or not?

rob

Step1Mark’s picture

I'm kinda looking for the same thing... did you find a way to do this?

Mark