Jump to content

johnjohn's Content

There have been 1 items by johnjohn (Search limited from 20-Jun 20)

Sort by                Order  

#135932 HTML blocks - language variable not showing correctly

Posted by johnjohn on 06 May 2012 - 02:24 AM in Configuration

Is the Smarty function {eval} available to use? for example, {eval var=$content} so it parses Smarty variables added into the HTML Block editor?

EDIT: This does work!
For example, the template variable inside of the customer template, blocks/unique_html_block.tpl, can be changed to:
{eval var=$items.block_text|unescape}

Then smarty variables will be parsed. For example, try placing {$config.current_url} inside of the HTML block editor to see the page's address string after the domain name.

The other cool thing about this is that HTML and Unique HTML blocks are not cached. Other blocks, like product and category menus are cached and makes it impossible to use template variables that change when the page changes. And the Smarty nocache parameter is ignored in them. So, the HTML Blocks appear to give full use of template variables and Smarty.