2012-02-21, 07:53:11
Angryboy Wrote:@Dominic: Have you configured your 'Items' special page using the 'SEARCH' tab on the 'Configure Special Pages' plugin page? Go to it, then copy and paste the the default php code that mvlcek provides on that page into the text field, then wherever you want to in that same coding, paste this (which assumes that your thumbnail field is called 'thumbnail'):
Thanks for the answer, Angryboy!
The cleaned up code (curly braces around branch, quotes for src parameter, encoding of thumbnail - 3rd parameter false, alternative text "Show" if no thumbnail):
Code:
<a href="<?php get_special_field('link','',false); ?>">
<?php if (return_special_field('thumbnail')!='') { echo '<img src="'; get_special_field('thumbnail','',false); echo '">'; } else echo "Show"; ?>
</a>
Angryboy Wrote:Then save it. On your parent page, have this somewhere (which assumes that your special page is called 'items':
The parameter tags is sufficient (although having both does not matter):
Code:
(% searchresults tags=_special_items %)