SPIP - Contrib

[ar] [en] [es] [fr] [it]



Home page > FAQ

How to modify your templates to avoid unknown pages ?

Friday 14 May 2004, by jonathan. Latest addition Friday 14 May 2004

All the versions of this article:


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:

<B_principale>
<BOUCLE_principale(ARTICLES){id_article}>

blah, blah, blah

</BOUCLE_principale>
<INCLURE(unknown.php3)>
<//B_principale>

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.


Reply to this article



Follow-up of the site's activity RSS 2.0 | Site Map | Private area | Charte et vie SPIP-Contrib | SPIP | L'autre.net