ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

plugins parse order

December 07, 2011 5:42pm

Subscribe [3]
  • #1 / Dec 07, 2011 5:42pm

    alex00

    35 posts

    I have the following

    {exp:hits:count_hits_image entry_id='{exp:test:getpage tag="id"}'}

    where exp:test is a plugin i created to get the entry id.

    exp:hits is being parsed before exp:test which makes the whole tag unfunctional. What can i do to tell expressionengine to parse the inside tag before parsing the outside.

  • #2 / Dec 08, 2011 8:26am

    Neil Evans

    1403 posts

    http://ellislab.com/expressionengine/user-guide/templates/plugins.html#changing-parsing-order

    I think this might be what your after… it was what i got stuck on till i was showen this hidden treat. parse=inwards

  • #3 / Dec 08, 2011 2:24pm

    alex00

    35 posts

    This does exactly the opposite of what i need. The inside tag is giving an empty value. It seems that it’s being parsed after the outside tag.

    If i have the inside tag on it’s own then it shows a value. But when i have it placed inside another tag as i have in my example above it doesn’t work.

  • #4 / Dec 08, 2011 3:58pm

    Kevin Smith

    4784 posts

    Hi alex00,

    While we’re not really set up to assist with development, I can offer this advice. It might be better if you wrote your plugin so that the usage was something like this instead:

    {exp:hits:count_hits_image}
    {exp:test:getpage tag="id"}
    {/exp:hits:count_hits_image}

    The reason I’d suggest this is because plugins, by default, are set to parse outward, meaning that anything inside plugin tags is parsed before the plugin tag itself. That should allow you the solution you’re looking for.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases