function outputFormat() { App::import('Helper', array('form', 'html')); $Form = new FormHelper(); $Form->Html = new HtmlHelper(); switch ($this->type) { case 'relatedlisting': if (!isset($this->params->output_format) || $this->params->output_format == '') { echo '<a href="{OPTIONVALUE}">{FIELDTEXT}</a>'; } else { echo $this->params->output_format; } break; case 'website': if (!isset($this->params->output_format) || $this->params->output_format == '') { echo '<a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a>'; } else { echo $this->params->output_format; } break; default: $format = $this->params->output_format == '' ? '{FIELDTEXT}' : $this->params->output_format; ?> <table class="admin_list"> <tr> <td> <strong>Output Format:</strong> - Enter any text and valid tags: {TITLE},{SECTION},{CATEGORY},{FIELDTEXT},{FIELDTITLE},{JR_NAME}<= will not work for select multiple or checkboxes. <br />The {OPTIONVALUE} tag can also be used for select lists, checkboxes and radiobuttons <br /><textarea class="outputformat" id="params[output_format]" name="data[Field][params][output_format]"><?php echo $format; ?> </textarea> <br /> </td> </tr> <tr> <td> <strong>Apply Output Format Before Click2Search:</strong> <?php echo $Form->radioYesNo("data[Field][params][formatbeforeclick]", "", Sanitize::getInt($this->params, 'formatbeforeclick', 0)); ?> </td> </tr> </table> <?php break; } }
function outputFormat() { App::import('Helper', array('form', 'html')); $Form = new FormHelper(); $Form->Html = new HtmlHelper(); switch ($this->type) { case 'relatedlisting': if (!isset($this->params->output_format) || $this->params->output_format == '') { echo '<a href="{OPTIONVALUE}">{FIELDTEXT}</a>'; } else { echo $this->params->output_format; } break; case 'website': if (!isset($this->params->output_format) || $this->params->output_format == '') { echo '<a href="{FIELDTEXT}" target="_blank">{FIELDTEXT}</a>'; } else { echo $this->params->output_format; } break; default: $format = $this->params->output_format == '' ? '{FIELDTEXT}' : $this->params->output_format; ?> <table class="admin_list"> <tr> <td> <strong>Output Format:</strong> Enter any text and valid tags: {title}, {section}, {category}, {fieldtext}, {fieldtitle}, {jr_fieldname}. If you want the value of the field without the outputformat or click2search then use {jr_fieldname|value}. . The {optionvalue} tag can also be used for select lists, checkboxes and radiobuttons <br /><textarea class="outputformat" id="params[output_format]" name="data[Field][params][output_format]"><?php echo $format; ?> </textarea> <br /> </td> </tr> <tr> <td> <strong>Apply Output Format Before Click2Search:</strong> <?php echo $Form->radioYesNo("data[Field][params][formatbeforeclick]", "", Sanitize::getInt($this->params, 'formatbeforeclick', 0)); ?> </td> </tr> </table> <?php break; } }