Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Small change request to google sitemap module

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 864 Views
  • baba-papa
    Avatar
    Community Member
    279 Posts

    Small change request to google sitemap module Link to this post

    Hello Ingo,

    I really like Your google sitemap module. In combination with order SilverStripe measures like clean URL's sites easily rank on high positions without much effort.
    For our ecommerce module SilverCart we need product detail pages to appear on the google sitemap. The thing is that our products are in fact DataObjects an not Pages. I had to decorate the function Items() of the class GoogleSitemap to make this work. I had to add the line

    $this->extend("updateItems", $newPages);

    after line 95 to make this function decorateable. I would be happy if You could add this line to the codebase so that I do not have to change core files.

    Thanks,

    Roland

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Small change request to google sitemap module Link to this post

    Hi baba-papa,

    The forum isn't the place to submit feature ideas as the module owner may not see your thread. You should submit patches as pull requests on the github project - https://github.com/silverstripe-labs/silverstripe-googlesitemaps.

    updateItems may also be a bad name for the extension hook as it isn't clear thats for googlesitemaps. Perhaps a good enhancement to the module would be a GoogleSitemapableDecorator which you could apply to your dataobject (say forum posts as well) then in Items it would get a list of all the items with the decorator attached.

    Patches welcome

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Small change request to google sitemap module Link to this post

    Hello Willr,
    thanks for your reply. Sebastian and I did some changes to the GoogleSitemap module. It now can be used to show DataObjects that have an own link. With the help of a static method the class name of the DataObjects to add is defined.
    We use Mercurial for code management and collaboration. I am not used to git hub and at the moment I'm too lazy to learn their command line syntax. How does a pull request work? Do I simply push to git://github.com/silverstripe-labs/silverstripe-googlesitemaps.git?

    Best regards,

    Roland

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Small change request to google sitemap module Link to this post

    No, you cannot simply push to the official repos. Instructions for how to contribute are available http://doc.silverstripe.org/sapphire/en/misc/contributing#sending-pull-requests-for-git

    If you wish, just submit a plain old diff patch file to open.ss and we can still merge it in the old skool way.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Small change request to google sitemap module Link to this post

    Hi willr,

    thanks for your offer to do it the lazy way. I started learning git yesterday and now I am very ambiguous to do it the right way making a pull request. This might take a few days.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Small change request to google sitemap module Link to this post

    Hi willr,
    I tired to make the pull request by using the terminal. GIT terminal commands are too confusing to me and I did not like the tutorials. It took me 4 weeks to learn mercurial. I'm not willing to go through this again atm. I made the pull request via git's website form.
    I may write a tutorial about how my changes work.

    864 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.