[Radiant] Excluding pages from search results
Mohit Sindhwani
tech at onghu.com
Sat Nov 10 12:38:17 CST 2007
john wrote:
> I'm using the search extension and the Radiant 0.6.3 gem. I see that
> I can set it to exclude pages like /sitemap/,/feed/ etc. and that
> works fine.
>
> Now I decided to exclude a whole section of my site. I tried adding
> the top level page of the section I want to exclude like /section-
> name/,/sitemap/ etc but it appears this mechanism is only for
> individual pages. So, I tried this on my search results page:
>
> ...
> <r:unless_content part="no-search">
> <r:search:results>
> <ul>
> <r:search:results:each><li><r:link/></li></
> r:search:results:each>
> </ul>
> </r:search:results>
> </r:unless_content>
> ...
>
> and then added a no-search page part to some pages and cleared the
> page cache, but those pages still appear in the results.
>
> Is this problem a limitation in the current search extension or am I
> just missing something obvious?
>
> thanks,
> john
Hi John,
Haven't used the search extension, so I may be completely off.
But, shouldn't the unless_content come *inside* search:results:each ?
That's how I exclude pages from showing up in the menu (that's just a
r:children:each...)
<r:children:each by="published_at" order="desc" status="published">
<r:unless_content part="no_menu"><li><r:link /></li></r:unless_content>
</r:children:each>
Cheers,
Mohit.
11/11/2007 | 2:36 AM.
More information about the Radiant
mailing list