eZ Community » Forums » Setup & design » URL for Object Relation
expandshrink

URL for Object Relation

URL for Object Relation

Saturday 23 June 2012 6:19:22 pm - 2 replies

Hi,

I am trying to create a class called portfoliolink which is basically a link to an object of my page (or even better a link to a page within my website).

On this class I added an Object Relation attribute to allow me to choose which object to link to. My question is:

How do I get in my template the URL to that related object?

Thank you for your help.

Saturday 23 June 2012 8:05:40 pm

Hi Ricardo

I am writing from memory:

 $node.data_map.relation_attribute.content.main_node.url_alias

where $node is the link node.

You can always use the attribute operator to see variables attributes and go deeper.

Cheers

Sunday 24 June 2012 12:33:11 pm

Thank you. It works perfectly.

 

Regards.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from