public
Description: Suggests relevant weblog entries on a 404 page
Homepage: http://shapeshed.github .com/expressionengine/plugins/friendly_404/
Clone URL: git://github.com/shapeshed/friendly_404.ee_addon.git
Click here to lend your support to: friendly_404.ee_addon and make a donation at www.pledgie.com !
name age message
file README.markdown Wed Aug 12 11:21:00 -0700 2009 updates to documentation [George Ornbo]
file pi.friendly_404.php Mon Nov 23 08:15:35 -0800 2009 fix code formatting [shapeshed]
README.markdown

Friendly 404 - Suggests relevant weblog entries on a 404 page

Author: George Ornbo Source: Github

Compatibility

  • ExpressionEngine Version 1.6.x

License

Friendly 404 is free for personal and commercial use.

If you use it commercially use a donation of $10 is suggested. You can send donations here.

Friendly 404 is licensed under a Open Source Initiative - BSD License license.

Installation

This file pi.friendly_404.php must be placed in the /system/plugins/ folder in your ExpressionEngine installation.

Name

Friendly 404

Synopsis

Returns suggestions of weblog entries on a 404 page.

Description

The plugin attempts to match entries to the last segment of the 404 URL helping users to find pages that match what they were looking for.

Add the following to your 404 template

{exp:friendly_404}
    {if count == 1}<ul>{/if}
        <li><a href="{auto_path}">{title}</a></li>
    {if count == total_results}</ul>{/if}
{/exp:friendly_404}

If no match is found nothing will be shown

Parameters

The following parameters are available:

limit - limits the number of entries returned (default: 5)

{exp:friendly_404 limit="10"} 

weblog - limits entries to weblogs defined by their short name (default: show all weblogs)

{exp:friendly_404 weblog="news|jobs"} 

Single Variables

{title}
{auto_path}
{url_title}
{count}
{total_results}
{weblog_id}
{search_results_url}

Examples

{exp:friendly_404 limit="10"}

Only 10 results will be returned

{exp:friendly_404 weblog="news|services"}

Only results from the news and services weblogs will be returned