Page 1 of 1

Use " or ' ?

Posted: Thu Aug 09, 2012 7:31 pm
by Joseph777
hi,

i read, that using " (eg. see below or another) can cause problems.

Code: Select all

{content block="abc" assign="abc" label="abc" oneline="true" block_tab="abc"}
{$cgsimple->get_page_content($node->alias,'abc')}
I want to ask you, what i have to use - " or ' ?

Re: Use " or ' ?

Posted: Thu Aug 09, 2012 7:35 pm
by calguy1000
Smarty attempts to parse stuff inside " so, I always use ' unless absolutely necessary.

Not only should it be a (minor) performance boost... but it'll solve problems like {content block="my-block"} causing errors, with smarty trying to interpret the - as an arithmetic operation.

Re: Use " or ' ?

Posted: Thu Aug 09, 2012 7:51 pm
by Joseph777
Thank you for explanation