Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » URLParams > Page Not Found?

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

Page: 1
Go to End
Author Topic: 275 Views
  • Garrett
    Community Member
    245 Posts

    URLParams > Page Not Found? Link to this post


    I am attempting to create a filter on a SQLQuery much like the Blog module does using:

    ...using $allowed_actions array and a function:

    function SelectedSector() {
    return ($this->request->latestParam('ID') == 'sector') ? Convert::raw2xml($this->request->latestParam('OtherID')) : '';

    ...where my URL structure is:

    As you can see I have another step in that URL which is why I am using the ID and then the OtherID params (instead of the standard 'Action' and then 'ID').

    I then want to take the output of this SelectedSector function and use it to build a string for my query. Again, exactly like the 'tagCheck' variable in the BlogTree (function Entries()).

    I am echoing $this->request->latestParams() in my Page class and everything looks good there. I am getting 'sector' as my ID and 'Digital+Media' as my OtherID. However, I am getting a Page Not Found error when I make the request! In the blog module, there is no Page whose URL is "tag," yet this works there. What am I doing wrong? I tried to copy this functionality as closely as possible. Why would I need a Page with this exact URL for this to work? I thought that was the whole point of the $allowed_actions array. What am I missing?

    I've attached the file in question.

    Thanks SS Gurus,

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.