Jump to content

 

johnjohn

Member Since 05 Mar 2009
Offline Last Active Jun 04 2013 07:13 AM
-----

Posts I've Made

In Topic: HTML blocks - language variable not showing correctly

06 May 2012 - 02:24 AM

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.