PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

merge tag inside a merge tag

  1. Is it possible to have a merge tag inside a merge tag? I'm trying to use the value of a radio button the user selects to pull a specific piece of information from a lookup table of custom fields attached to the post the form is on.

    Like so: {custom_field:{size:6}}
    but it doesn't seem to work. It works if i manually enter the value in as a test of the custom field like so: {custom_field:3x8}
    So i know it can successfully find the value from the custom field of that post. Maybe it is just not possible to do recursive merge tags?

    What would an alternative solution be in that case? is there a filter i could use perhaps?
    I took a look at the docs, but none of the filters really seemed like they fit the job. Is there a way to compute a merge tag from php?


    Posted 10 years ago on Tuesday January 31, 2012 | Permalink
  2. This isn't currently a supported features. The way the merge tags are parsed they don't try and parse merge tags within each of the available options in the merge tag. It may be something we add in the future, but it may cause performance issues as it could get out of control as far as the programmatic parsing that would be required.

    Another option may be for you to create your own custom merge tag:

    Posted 10 years ago on Tuesday January 31, 2012 | Permalink