Jump to content

Attepting to Fetch Pages Based Off of Field Match in Latte Filter


protro
 Share

Recommended Posts

Hello PW forums,

I have an interesting problem I am trying to solve. I am displaying a list of artists, that are children of the parent page Artists.

{foreach $pages->get("name=artists")->children() as $item}

These children pages act as tags for other pages which have a field 'artist', and are appropriately tagged.
I am trying to send the link's href attribute to the latest project page for that artist, rather than the default, which is a sort of artist index page listing all the projects for that artist.

<a href="{$pages->get('template=concert-visuals|broadcast|music-videos, artist.name={$item->name}')->first->url}"> 
  {$item->title}
</a>

I can't seem to fetch anything. What am I missing here ?

Link to comment
Share on other sites

  • protro changed the title to Attepting to Fetch Pages Based Off of Field Match in Latte Filter

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...