StaticPages Validation Error
Posted: Mon Dec 11, 2006 2:25 am
Hello,
It was brought to my attention that when performing "Quicksearch" an HTML validation error would be generated if 0 static pages existed, and the static pages plugin was installed.
Quick Fix:
In the "plugin_staticpage_searchresults.tpl" file, change the following:
to
Basically, you just want your Smarty to pull up the "ul class" only if there is something to display. If there is nothing to display (no "li"), a validation error is produced because it is assumed that a "li" should live within a "ul".
Fun stuff, and thank you to Frank
DB
It was brought to my attention that when performing "Quicksearch" an HTML validation error would be generated if 0 static pages existed, and the static pages plugin was installed.
Quick Fix:
In the "plugin_staticpage_searchresults.tpl" file, change the following:
Code: Select all
<ul class="staticpage_result">
{foreach from=$staticpage_results item="result"}
<li><strong><a href="{$result.permalink|@escape}" title="{$result.pagetitle|@escape}">{$result.headline}</a></strong> ({$result.realname})<br />
{$result.content|@escape:htmlall|@truncate:200:" ... "}</li>
{/foreach}
</ul>
to
Code: Select all
{foreach from=$staticpage_results item="result"}
<ul class="staticpage_result">
<li><strong><a href="{$result.permalink|@escape}" title="{$result.pagetitle|@escape}">{$result.headline}</a></strong> ({$result.realname})<br />
{$result.content|@escape:htmlall|@truncate:200:" ... "}</li>
</ul>
{/foreach}
Fun stuff, and thank you to Frank
DB