How to modify your templates to avoid unknown pages ?

All contributions published for previous SPIP versions

Our search engine friend recorded an article that you deleted, so following the link leads to an empty page.

Let’s use the loops’ power, read this article, and put this in pratice:
"The alternative code (ended by <//Bn>) is displayed instead of the loop, thus replacing the optional “before” and “after” codes, if the loop doesn’t return any results at all."

This should be used on the article page as:


blah, blah, blah 


Next, create the couple unknown.php3 unknown.html.
For the page unknown .html you can offer text and a redirection to the home page or the site map, for example.
Or an automatic redirection.

updated on 14 May 2004


Aucune discussion

Ajouter un commentaire

Who are you?
[Log in]

To show your avatar with your message, register it first on (free et painless) and don’t forget to indicate your Email addresse here.

Enter your comment here

This form accepts SPIP shortcuts {{bold}} {italic} -*list [text->url] <quote> <code> and HTML code <q> <del> <ins>. To create paragraphs, just leave empty lines.

Add a document

Follow the comments: RSS 2.0 | Atom