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.

Using exp:weblog:entries to populate assign_variable variables...

May 26, 2010 4:46pm

Subscribe [2]
  • #1 / May 26, 2010 4:46pm

    sandiegozoo

    62 posts

    Is this not possible?

    {exp:weblog:entries weblog="gardens" limit="1"}
    {assign_variable:single_garden="{title}"}
    {assign_variable:single_garden_description={garden_description}}
    {assign_variable:single_garden_location={garden_location}}
    {assign_variable:single_garden_type={type}}
    {/exp:weblog:entries}

    I have tried with quotes (as in title above) and without (as with everything else above),
    but no love. See: http://www.sandiegozoo.org/plants/gardens/Australian_Wonders/
    I am in the unique position of needing to move a site into ee so that we can upgrade an old server, but not being able to move it yet because too much of what would be really useful (multi-select custom fields, etc.) is not available to me, basically because the old server is running PHP 4* with no chance of upgrade….

  • #2 / May 26, 2010 4:51pm

    Ingmar

    29245 posts

    No, that’s not possible. {assign_variable} is a single string replacement that’s performed only once, at the beginning of code compilation. It’s not a “true” variable in the strict programmer’s sense.

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

ExpressionEngine News!

#eecms, #events, #releases