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.

Content Organization Design Advice

May 25, 2008 6:20pm

Subscribe [2]
  • #16 / May 27, 2008 5:18pm

    Ian Cook

    93 posts

    while trying other stuff to get this working, i tried this:

    {assign_variable:var_lessonid="{lessonid}"}
    Lesson ID: {var_lessonid}
    {reverse_related_entries orderby="itemsort"}
    Lesson ID: {var_lessonid}
    {/reverse_related_entries}

    as you can see, i set a variable to equal the value of the {lessonid} custom field. then i echoed that variable, opened a reverse_related_entries block and echoed it again.

    the variable displays outside the block, but does not display inside.

    why can’t i use variables inside a reverse related entries block that were defined outside of it?

  • #17 / May 27, 2008 5:24pm

    Ian Cook

    93 posts

    even stranger…

    it appears as though only custom fields don’t get passed through into the reverse_related_entries block.

    if i change the above code to ...

    {assign_variable:var_lessonid="test"}
    Lesson ID: {var_lessonid}
    {reverse_related_entries orderby="itemsort"}
    Lesson ID: {var_lessonid}

    ... ‘test’ gets output both inside and outside the block as expected. why isn’t a custom field passed to a variable getting through to the inside of a reverse_related_entries block, but a plain text string is?

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

ExpressionEngine News!

#eecms, #events, #releases