Meta and Rel tags for individual pages

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Posts: 15
Joined: Fri Dec 14, 2018 6:27 am

Meta and Rel tags for individual pages

Post by jmglastetter » Wed Jan 29, 2020 4:01 am

I'm currently using the HTML nugget plugin to insert into the head for site-wide information.

Needing to insert robot meta tags and rel canonical tags to the head of individual static pages.

Is there a way to do this, maybe another plugin I'm overlooking?

User avatar
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany

Re: Meta and Rel tags for individual pages

Post by yellowled » Sat Feb 01, 2020 8:26 pm

Not specifically for robots and canonical, I think.

A lot the more modern themes included in the s9y core add these in their index.tpl, for example 2k11. If you're using an older theme and don't want to switch, you could just add the respective lines to your index.tpl (in the <head> area, of course).

Code: Select all

{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')}
    <meta name="robots" content="index,follow">
    <meta name="robots" content="noindex,follow">
{if ($view == "entry")}
    <link rel="canonical" href="{$entry.rdf_ident}">
{if ($view == "start")}
    <link rel="canonical" href="{$serendipityBaseURL}">
amazon Wishlist - Serendipity-Podcast (German only, sorry)

Post Reply