What is $c
Permalink
Morning all,
Am just getting to grips with C5 (it's brilliant). I have a question about the variable $c. Is $c a predefined variable used by concrete5?
What does $c stand for- 'content' maybe? I just like to be able to read the code and understand it before I commence.
Thanks
Am just getting to grips with C5 (it's brilliant). I have a question about the variable $c. Is $c a predefined variable used by concrete5?
What does $c stand for- 'content' maybe? I just like to be able to read the code and understand it before I commence.
Thanks
thanks very much
$c stands for "Collection", which in the Concrete5 internal system almost always means the same exact thing as a "Page". (As in "a collection of blocks", because in C5 a page is made up of blocks).
good explanation - thanks again
you can print $c to know what data carry on :)
echo '<pre>';
print_r($c);
echo '</pre>';
echo '<pre>';
print_r($c);
echo '</pre>';
$c is a global variable used by C5.
$c refers to the Collection instance object.