Hi,
I am attempting to create a filter on a SQLQuery much like the Blog module does using:
http://www.mysite.com/blog/tag/my+tag
...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:
http://www.mysite.com/clients/filter/sector/Digital+Media
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,
Garrett