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.

global variables not parsing as parameters

November 13, 2012 3:18pm

Subscribe [2]
  • #1 / Nov 13, 2012 3:18pm

    leegreen

    29 posts

    I am having troubles with global variables not parsing when passed as parameters.

    MOD EDIT added code tags

    {exp:channel:entries 
         disable="categories|category_fields|member_data|pagination|trackbacks"
         dynamic="no"
         entry_id="{structure:child_ids_for:21}"
        }
    
    (0.012500 / 3.36MB) Tag: {exp:channel:entries disable="categories|category_fields|member_data|pagination|trackbacks" dynamic="no" entry_id="{structure:child_ids_for:21}" }

    The same result is produced with and without parse=“inward”

    However this works fine and grabs the data I need

    {exp:channel:entries 
         disable="categories|category_fields|member_data|pagination|trackbacks"
         dynamic="no"
         entry_id="{exp:query sql='SELECT exp_structure.entry_id, 
        exp_structure.parent_id, 
        exp_structure.lft
        FROM exp_structure
        WHERE parent_id = 21
        ORDER BY exp_structure.lft ASC'}{entry_id}|{/exp:query}"
         parse="inward"
        }

    But, then if I add in a global variable author_id=”{logged_in_member_id}” it fails to work, if I hard code that value as 1 then it functions.

    Any thoughts as to what could be happening here?

  • #2 / Nov 14, 2012 9:50am

    Boyink!

    5011 posts

    I’d suggest reading up on EE’s parse order:

    http://loweblog.com/downloads/ee-parse-order.pdf

  • #3 / Nov 14, 2012 3:15pm

    leegreen

    29 posts

    Thanks for the link, Mike.

  • #4 / Nov 15, 2012 2:06pm

    Shane Eckert

    7174 posts

    Hey there leegreen,

    I am glad to see that Mike was able to offer some help with the Parse Order.

    Is there anything else I can help you with?

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases