Greetings,

I am having trouble trying to embed the node $links (Add a comment, read more, etc.) into the body of a contemplate. What is the best way to do this? Here was my guess so far, also keep in mind, I have an extremely limited programing knowledge.

<?php foreach ((array)$node->links as $item) { ?>
      <div class="field-item"><?php print $item ?></div>
    <?php } ?>

But all that does is just returen a bunch of the word 'array'. Anyone have any idea how to do this?

TIA,
txcrew

Comments

stevenpatz’s picture

Sure. Go to http://YOURSITE/admin/content/templates.

Pick from the list, I have a content type called article.

Then expand the BODY section and check "Affect body output"

On the right you should see a list of variables. Click on one and it goes to the left side. So find the variable you need, click on it and the cut and paste that to where you need it.

Anonymous’s picture

Thanks for the reply spatz4000.

I actually tried your suggestion first but the problem is that I'm using some mods like, fasttoggle and views_bookmarks that have a lot of different variables and I can't seem to find the one that will display the link correctly. One variable will display the link text, one will display the redirection upon clicking the link, etc.

I thought maybe there would be something in contemplate that would just let you print the entire $links??

Any more thoughts?

Thanks again,
txcrew

stevenpatz’s picture

I dunno. There should be something built in, I would think.

nainainai’s picture

i dont think that code work it gave me some error

stevenpatz’s picture

and that error was?

jrglasgow’s picture

Status: Active » Postponed (maintainer needs more info)
jrglasgow’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)