Share » Forums » General » Display all locations

Display all locations

Display all locations

Thursday 09 March 2006 6:13:01 am - 3 replies

Author Message

Kåre Køhler Høvik

Thursday 09 March 2006 7:03:41 am

Hi

Try this :

{foreach $node.object.assigned_nodes as $location}
<a href={$location.url_alias|ezurl}>{$location.name|wash}</a><br />
{/foreach}

Kåre Høvik

Christian Johansen

Thursday 09 March 2006 7:32:34 am

I tried that earlier, and fetches the same object in its respective locations which is not really what I want - I want all the parent locations. If I have this:

Someobject

Locations:
Topic - SomeTopic - Someobject
Topic - SomeOtherTopic - Someobject

Then I want to do this:

Someobject
- <a href="/topic/sometopic">SomeTopic</a>
- <a href="/topic/someothertopic">SomeOtherTopic</a>

But with your suggestion I get this:

Someobject
- <a href="/topic/sometopic/someobject">SomeObject</a>
- <a href="/topic/someothertopic/someobject">SomeObject</a>

Marc Boon

Saturday 11 March 2006 3:10:46 am

Then just show the parents of the found locations:

{foreach $node.object.assigned_nodes as $location}
<a href={$location.parent.url_alias|ezurl}>{$location.parent.name|wash}</a><br />
{/foreach}

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

36 542 Users on board!

Forums menu