I'm trying to create a simple text field that can be optionally shown on a Joomla article.
At the moment I have created 2x custom article params (viewable and quick_summary)
administrator > components > com_content > models > article.xml
<params group="advanced">
<param name="viewable" type="list" default="no" label="Viewable" description="">
<option value="no">No</option>
<option value="yes">yes</option>
</param>
<param name="quick_summary" type="textarea" rows="10" cols="30"
label="Summary" description="Summary" />
<param type="spacer" />
...
</params>
In the template file
To have the quick_summary show depending on the status of viewable I have used the following:
<?php
if ($this->params->get('viewable') == "yes") {
echo $this->params->get('quick_summary');
}
?>
Any help hugely appreciated