Use " or ' ?

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Joseph777
Forum Members
Forum Members
Posts: 206
Joined: Wed Mar 16, 2011 9:13 am

Use " or ' ?

Post 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 ' ?
Last edited by Joseph777 on Thu Aug 09, 2012 7:36 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Use " or ' ?

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Joseph777
Forum Members
Forum Members
Posts: 206
Joined: Wed Mar 16, 2011 9:13 am

Re: Use " or ' ?

Post by Joseph777 »

Thank you for explanation
Post Reply

Return to “The Lounge”