Follow/nofollow on categories

In Litium.Web.MetaServiceImpl.cs in the accelerator in Litium 7.6.2, the robot meta tag for categories comes from the startpage. Is this a feature or a bug?

So if startpage has noindex/nofollow, all categories will be the same.

Some of the strange(?) decompiled code

    bool flag = this._fieldTemplateService.Get<PageFieldTemplate>(page.FieldTemplateSystemId).IndexThePage && page.Fields.GetValue<bool>("_indexThePage");
    if (category != null)
    {
      robotsSettings.DefaultFollow = page.Fields.GetValue<bool>("_followLinks");
      robotsSettings.DefaultIndex = flag;
    }
    else
    {
      robotsSettings.DefaultFollow = page.Fields.GetValue<bool>("_followLinks");
      robotsSettings.DefaultIndex = flag;
    }

Litium version: 7.6.2

Categories doesn’t have any pages themselves and are considered as the start page, so that’s why it inherits its settings. At this time the categories themselves doesn’t support individual settings for this.

Maybe you could add the setting as a field and then decorate the service?

We had noFollow in the startpage in the test environment so it was some confusion when going live. But changing the startpage sovled our problems.

But I just wanted to check if this was a bug or something that was planned. Because when i looked at the decompiled code, it looks a bit strange. That IF statement is not needed. So it could have been a misstake, and something else was suppose to happen :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.