<div class="faq-entry-description"> <?php echo $cobj->getCollectionDescription()?> <?php $blocks = $cobj->getBlocks('Main'); $b = $blocks[0]; $bi = $b->getInstance(); $content = $bi->getContent(); if (strlen($content) != 0) { ?> <a href="<?php echo $nh->getLinkToCollection($cobj)?>" style="font-weight: bold">Read More ></a> <?php } ?> </div>
<?php Loader::model("attribute/categories/collection"); $akt = CollectionAttributeKey::getByHandle('faq_showfullanswer'); if (is_object($faq)) { $tvalue = $faq->getAttributeValueObject($akt); } ?> <strong><?php echo $akt->render('label'); ?></strong> <div><?php echo $akt->render('form', $tvalue, true); ?></div> <br/>
$cak = CollectionAttributeKey::getByHandle('faq_showfullanswer'); $cak->saveAttributeForm($p);
<?php if ($cobj->getCollectionAttributeValue('faq_showfullanswer') == 1) { ?> <a href="<?php echo $nh->getLinkToCollection($cobj)?>" style="font-weight: bold">Read More ></a> <?php } ?>
echo $cobj->getCollectionDescription();
[code]
The updated section should look like this:
[code]
<div class="faq-entry-description">
<?php
echo $cobj->getCollectionDescription();
if ($cobj->getCollectionAttributeValue('faq_showfullanswer') == 1) {
?>
<a href="<?php echo $nh->getLinkToCollection($cobj)?>" style="font-weight: bold">Read More ></a>
<?php } ?>
</div>
<?php
//Paul Mod
if ($cobj->getCollectionAttributeValue('exclude_nav') == 0) { ?>
<a href="<?php echo $nh->getLinkToCollection($cobj)?>" style="font-weight: bold">Read More ></a>
<?php } ?>
Basically it checks to see if you have the "exclude from Nav" option and then doesn't display the more unless you do.