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.

Search results to link direct to pdf

August 28, 2009 5:33am

Subscribe [1]
  • #1 / Aug 28, 2009 5:33am

    cultivate

    37 posts

    Ive setup my search results page which handles links to pages within the site, with the following code.

    {exp:search:search_results}
    <li class="{switch='resultRowOne|resultRowTwo'}">
    {if page_url != ''}
    <a href="http://{page_url}">{title}</a>
    
    {if:else}
    <a href="http://{auto_path}">{title}</a>
    
    {/if}
    {excerpt}
    </li>
    {/exp:search:search_results}

    However one section of my site displays a list of pdf links on one page. At the moment when they appear in search results ee trys to link to a page with the single pdf on it, which doesnt exist.

    To display the pdfs, i setup a weblog, and a custom field which contains the link to the pdf ie
    Pdf title
    pdf link

    What id like to be able to do is to have the results for pdfs to link straight to the pdf is this possible?

    Thanks

  • #2 / Aug 31, 2009 8:32am

    cultivate

    37 posts

    Have i posted this is the wrong forum, or does nobody know the answer?

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

ExpressionEngine News!

#eecms, #events, #releases