ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Restricting search module by weblog excludes pages

July 23, 2008 2:00am

Subscribe [1]
  • #1 / Jul 23, 2008 2:00am

    cherrypj

    158 posts

    I restricted my search to specific weblogs—I don’t have templates for all of my weblogs (some just hold data, which are displayed in other templates). Without the search restriction, the search results would point to non-existing URLs or just look plain weird. Restricting the search was the best option.

    {exp:search:simple_form id="search" search_in="everywhere" weblog="read|ask|stories|flavor" result_page="/search/" results="6"}
            <input id="search-text" type="text" value="Search this site" name="keywords">
            <input type="image" src="/images/css/btn-go.gif" alt="Go" />
        {/exp:search:simple_form}

    But now, my Pages are excluded from the search results. Is there a way I can include Pages in the search?

  • #2 / Jul 23, 2008 10:21am

    Robin Sowell

    13255 posts

    They should show up- are they in one of the weblogs specified?  You format the link a la:

    {if page_url != ''}
    <a href="http://{page_url}">View this page</a>
    {/if}

    In the search results tag.

  • #3 / Jul 23, 2008 10:46am

    cherrypj

    158 posts

    are they in one of the weblogs specified?

    Ah, no, they’re not. That’s it.

    Thanks, Robin. You can close.

  • #4 / Jul 23, 2008 10:49am

    Robin Sowell

    13255 posts

    😉  I do that all the time!  Glad it was an easy fix.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases