Hi! I was looking for a solution for some time and I couldn't find anything.

I would like to know if it is possible to print a Parent node's link (when a child node is displayed) in node.tpl.php.

Thanks in advance.

Comments

mellamoanton’s picture

I found a solution. I've created a Views' block with Node Hierarchy: Parent Node ID as Relationship, Content: Nid as Contextual filter and Content: Title (with the relationship) as field.

It works right, but... what's my problem? I'm loading the content via Ajax, so Contextual filter only works when I refresh the page (you see the content through the URL, not Ajax).

Any help is welcome.

Solved: I placed the block in the region Content and everything works right.

mellamoanton’s picture

Status: Active » Closed (fixed)