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

 
moosh replied on at Permalink Reply
moosh
Hi,

$c is a global variable used by C5.

$c refers to the Collection instance object.
nosuch replied on at Permalink Reply
thanks very much
jordanlev replied on at Permalink Reply
jordanlev
$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).
kappi replied on at Permalink Reply
good explanation - thanks again
fastcrash replied on at Permalink Reply
fastcrash
you can print $c to know what data carry on :)

echo '<pre>';
print_r($c);
echo '</pre>';

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.