We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Preview URL based on an entry's field?

How Do I?

rzerb's avatar
rzerb
7 posts
6 years ago
rzerb's avatar rzerb

When setting the Preview URL for the Live Preview feature, is it possible to use a field’s value for the Channel entry to establish the ‘template group’ in the URL?

For instance, if I use the following in a Channel’s Preview URL

{parent_page}/{url_title}

where the data for {parent_page} field is a Select field, I get the following error message in the Live Preview rendering:

{"error":"The URI you submitted has disallowed characters."}

I even tried {parent_page:label} to no avail. Is there a special way to approach this or is the functionality just not there?

Thanks in advance! -Reid

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
6 years ago
Kevin Cupp's avatar Kevin Cupp

Hi Reid,

No, sorry, custom fields aren’t parsed in that field, interesting idea though! I think only {url_title}and {entry_id} works there, currently.

       
rzerb's avatar
rzerb
7 posts
6 years ago
rzerb's avatar rzerb

Thank you Kevin. It would have been nice to be able to have the preview get the template based on some other value but I think I will restructure my channels. This will ensure that all templates can be found in one group that will align with individual channels. Thanks again. -Reid

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.