$page->getAttribute() $cobj->getCollectionAttributeValue()
Permalink
Hi,
Just a quick one that i dont understand what are the different ways to pull in an attribute from a page and when should they be used?
I am using
$page->getAttribute()
$cobj->getCollectionAttributeValue()
$c->getAttribute()
can someone shed some light?
Just a quick one that i dont understand what are the different ways to pull in an attribute from a page and when should they be used?
I am using
$page->getAttribute()
$cobj->getCollectionAttributeValue()
$c->getAttribute()
can someone shed some light?
Just a matter of what variable is used in that instance for the page collection, whether page cobj or c is used.
Is there a reason why a developer would use one variable over the other? In the core code, "$c = Page::..." is used a lot but "$cobj = Page::..." is NEVER used. Do they represent different 'collections' or is it just semantics?
I Was more interested in the difference between
getAttribute()
getCollectionAttributeValue()
getAttribute()
getCollectionAttributeValue()
Curiosity or a specific problem?
Have a look at the code. Line 123 of [root]/concrete/core/models/collection.php
Have a look at the code. Line 123 of [root]/concrete/core/models/collection.php
Just curiosity