Hey guys,
I've been trying to create a tag system with article pages and one of the things I wanted to do is introduce a search by tag feature in my project. Here's what I've got:
class ArticlePage extends Page {
private static $many_many = array(
"ArticleTags" => "ArticleTags"
);
}
class ArticleTags extends DataObject{
private static $db = array(
"Title" => "Varchar(200)"
);
private static $belongs_many_many = array(
"ArticlePages" => "ArticlePage"
);
I have the tagfield module installed to make things easier in the backend.
How would I go about creating within a page controller a way to use ORM, HTTP Request (so SS_HTTPRequest to getParam) and work with many_many objects (ArticleTags and ArticlePage). Never been able to crack many_many things.
Cheers,
Stephen