0

How can I build a custom URL structure using Playa fields as segments?

Like this:

http://example.com/templateGroup/template/playaParent/playaChild

2 Answers 2

1

Playa tags will not have parsed before the page loads.

If you matched your playa field and template names you could generate links with Playa then clicking the link would take you to the corresponding template.

0

We'd need a bit more detail about what you're trying to do to give a more specific answer, but I don't think you need to do anything special to do this. I've done it before. Having both parent and child url_titles in the URL and using each to load up the correct entries.

Really that doesn't have anything to do with Playa at all, except for when you want to ensure that the parent-child relationship in the URL really exists.

I've done this in the past by loading up the parent entry in a channel:entries tag and comparing the playa field's selected entry to the child entry in the URL. If they don't match, then throw a 404.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.