Jump to:

5514 Posts in 1733 Topics by 1219 members

Customising the CMS

SilverStripe Forums » Customising the CMS » how to access current page properties from page controller

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

Page: 1
Go to End
Author Topic: 1373 Views
  • billa
    Avatar
    Community Member
    2 Posts

    how to access current page properties from page controller Link to this post

    Hi, I'm trying to build a link feed of local site pages whose meta tags match the current page. I'm having some difficulty accessing the current pages' meta tags. I know that so far, I want to return something like this:

    $MetaTags = MetaKeywords of the current page, how do I get this?

    return DataObject::get("SiteTree", "MetaKeywords LIKE '%$MetaTags%'");

    Can anyone point me in the right direction?

    Thanks!

  • billa
    Avatar
    Community Member
    2 Posts

    Re: how to access current page properties from page controller Link to this post

    I found the keywords in $this->MetaKeywords

    1373 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.