I want to display the other fields I added to an item of a subcategory in my main category. Here it is what I am doing,
I created a category and type called Page, which is similar to articles. Also, I created another category and type called Project.
The category project is a subcategory of Page. And I want to display a small index of the items of type projects.
To obtain the items of this subcategory on the category I do the following:
Code:
$Proy = new FlexicontentModelCategory();
$Proy->setId($this->categories[0]->id);
$Proy->getCategory();
$Proy->getData();
$Proy->getChilds();
$ProyView = new FlexicontentViewCategory($Proy);
After I do this I have a list of the items, and I can access the title and the introtext of all the items, but I dont have access other fields like for example images, year of the project, etc.
So I figured I have to use a similar class like FlexicontentModelCategory but for items, that can connect to the database to get the rest of the items like it does for every item with FlexicontentModelItems.
I tried using FlexicontentModelItems, but it didnt recognize the class, i am asuming it has to do with the fact that FlexicontentModelCategory is called in as part of the mcv, and FlexicontentModelItems is called on it respective Model. (I dont know how to explain this in english, but it make senses that is doesnt work respecting the mcv thing)
How can I call that class to get the information need to that, or should I use another class or should I write my own class or.