Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Seo Extension


Go to End


6 Posts   2472 Views

Avatar
Nelia

Community Member, 3 Posts

8 April 2014 at 1:46am

I have installed the seo module from HubertusAnton and it's working fine on pages with pagetype Page. It creates a new tab in the CMS where you can optimize the page for searchengines. Now I have created a new pagetype PortfolioPage (extends Page). I expected that the SEO module would show up in the CMS for the new pagetype as well since it extends Page. But I can't seem to get the SEO module to work on pages with pagetype 'PortfolioPage'. In the docs I read that I should put the new class in the yml-config file but I am probably doing something wrong, since this is also not solving the problem. Can someone please give me a clue?

Avatar
camfindlay

Forum Moderator, 267 Posts

8 April 2014 at 2:44pm

Can you post more information about your yaml config? One thing to double check is that you are indenting your yml files using 2 spaces and not tabs.

Avatar
Nelia

Community Member, 3 Posts

8 April 2014 at 6:58pm

Edited: 08/04/2014 7:02pm

Ofcourse, here it is. The spaces are there though. No tabs :)

---
Name: 'seoextensions'
---
Page:
  extensions:
    0: 'SeoObjectExtension'
SeoConfig:
    Page: true
    ErrorPage: false
    RedirectorPage: false
    VirtualPage: false
PortfolioPage:
  extensions:
    0: 'SeoObjectExtension'

edit: the spaces get lost when the post is viewed, so I attached a txt-file with the yml content

Attached Files
Avatar
Nelia

Community Member, 3 Posts

11 April 2014 at 1:16am

Finally found the problem: all the while I was adding my own Class to the config.yml but in the wrong way. Attached the correct yml-file, where you see my own class PortfolioPage added under SeoConfig (duhhh, why did it take me so long to get this ?? )

Attached Files
Avatar
bartvanirsel

Community Member, 96 Posts

29 December 2014 at 10:58pm

Hi Nelia,

There is a new version (2.0) released which works the opposite way. All Pages which extend Page have the SEO Tab.
Excluding Pages to have the SEO tab can be set in the config. Also the suggest from Google works better.

Cheers,

Bart

Avatar
bartvanirsel

Community Member, 96 Posts

29 December 2014 at 10:58pm

And btw the new release is not backwards compatible :)