Checkbox attribute
Permalink
Should be easy but I can't find any documentation about it.
When the checkbox is checked display this, if not show nothing.
tried:
<?php echo $page->getAttribute('checkboxattribute') ? "yes" : "no" ?>
But this always show yes.
Tried:
<?php if ($page->getCollectionAttributeValue('checkboxattribute') == 1) { echo 'test'; } ?>
Or 1 as true,, also always displays test..
Loader::model("attribute/categories/collection"); is loaded.
So what am I missing? cheers!
When the checkbox is checked display this, if not show nothing.
tried:
<?php echo $page->getAttribute('checkboxattribute') ? "yes" : "no" ?>
But this always show yes.
Tried:
<?php if ($page->getCollectionAttributeValue('checkboxattribute') == 1) { echo 'test'; } ?>
Or 1 as true,, also always displays test..
Loader::model("attribute/categories/collection"); is loaded.
So what am I missing? cheers!