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

Use expression in tag parameter

How Do I?

swinggraphics's avatar
swinggraphics
2 posts
8 years ago
swinggraphics's avatar swinggraphics

I want this:

{exp:channel:entries channel="doctor_finder" status="not closed" author_id="CURRENT_USER" limit="1" dynamic="no"}{entry_id}{/exp:channel:entries}

to be used as the value for entry_id in:

{exp:safecracker channel="doctor_finder" return="safecracker/ENTRY_ID" json="yes" entry_id="" parse="inward"}

I cannot figure out how to get this to work. I tried the full thing:

{exp:safecracker channel="doctor_finder" return="safecracker/ENTRY_ID" json="yes" entry_id="{exp:channel:entries channel="doctor_finder" status="not closed" author_id="CURRENT_USER" limit="1" dynamic="no" parse="inward"}{entry_id}{/exp:channel:entries}"}

I tried a snippet:

{exp:safecracker channel="doctor_finder" return="safecracker/ENTRY_ID" json="yes" entry_id="{snp_current_user_profile_id}" parse="inward"}

I tried an embedded template:

{exp:safecracker channel="doctor_finder" return="safecracker/ENTRY_ID" json="yes" entry_id="{embed='location_mapper/current_user_profile_id'}" parse="inward"}

The full thing and embedded template result in an error page with “You must specify a valid entry to edit.” The snippet just doesn’t do anything. How can I achieve this?

EE 2.3.1

       

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.