Loading...
 
Skip to main content

Features / Usability


Selectivly hiding pages from search engines

posts: 3665 United States

I need to "hide" some pages from being crawled by Google (for example, ../tiki-index.php?page=Foo). How can I include

Image
Copy to clipboard
< meta name="robots" content="noindex,nofollow,noarchive" >


in specific wiki pages? I thought of simply having a plain text file with the necessary META information, then using an {INCLUDE} statement. But how can I move the META to the HEAD tag?

posts: 17

The following inserted into ./templates/header.tpl should work:

Image
Copy to clipboard
{if $page eq 'foo'} < meta name="robots" content="noindex,nofollow,noarchive" > {/if}


ewan

posts: 3665 United States

Yes, that will work, but then I'd have to add a new {if} statement in the HEADER.TPL for every page to hide — that's a lot of work! Each time a user adds or removes a wiki page, I'd have to change the HEADER.

It will be much easier to control this at the wiki page level — not a global template.

How can I specify where in a file the called {INCLUDE} should appear?