Skip to main content

SiteArchitect - CMS_SET and Datasources within Page Template

Comments

1 comment

  • Zendesk API User
    Author: mbergmann - 2/11/2016 19:20

    Hi Upendra,

    the "two part" CMS_SET does not directly evaluate its content and assigns that content to a variable. Instead, it defines a "TemplateFragment" that is evaluated later when calling CMS_VALUE on the variable. As a result, the output uses the values of all variables they have at the moment of the CMS_VALUE call.

    To force the evaluation you can use a temporary variable and .toString():

    $CMS_SET(set_temp)$

            $CMS_RENDER(template:"channel_import", type:"tt", uid:"standard.menus")$

    $CMS_END_SET$

    $CMS_SET(stringToInsert[stringToReplace.size-1], set_temp.toString())$

    Michael

    0

Please sign in to leave a comment.