Search code examples
phpcontent-management-systemsmartycmsmadesimple

CMSMS("CMS Made Simple") user defined tags works only in <head> section?


I have a really strange problem with CMSMS - why the hell this is HALF-working:

<head>
{if $current_step=='2' or $current_step=='4'}
HEAD_ON
{else}
HEAD_FAIL
{/if}
</head>
{if $current_step=='2' or $current_step=='4'}
NEITHER_ONE_OK
{else}
NEITHER_ONE_FAIL
{/if}
<body>
{if $current_step=='2' or $current_step=='4'}
BODY_OK
{else}
BODY_FAIL
{/if}
</body>

Returns:

HEAD_OK
NEITHER_ONE_FAIL
BODY_FAIL

I use latest CMSMS version - 1.9.3. And CMSMS is based on smarty, allowing to do this in CMSMS UDT section:

$gCms->smarty->assign('current_step',"".htmlspecialchars($_GET['step_id'])."");

I suppose this problem would be possible if CMSMS use some methodology which first interprets body section, then compiles UDT, and then compiles whole website.

Any solutions? Thank you.


Solution

  • Answer from CMSMS dev team: "CMSMS (by default) processes the stuff above first, then the section, then the head section, and glues the results back together before output."