Good day, guys. I'm can't think of a better way to phrase the question. But here's an overview of what I wanted.
I'm working on a site with the following structure:
Lessons
- Grammar
- Lesson 1
- Lesson 2
- Lesson N
- Composition
- Lesson 1
- Lesson 2
- Lesson N
- Vocabulary
- Lesson 1
- Lesson 2
- Lesson N
- Accent
- Lesson 1
- Lesson 2
- Lesson N
Q & A
- Word Usage
- Q & A 1
- Q & A 2
- Q & A N
- Difference Between
- Q & A 1
- Q & A 2
- Q & A N
Now on the homepage, I want to display the latest lessons using getResources. For usability, the plan was to assign specific colors to each article, depending on its main container (Lesson or Q&A). To accomplish this, I plan on outputing a CSS class for each snippet of the article that will be on the homepage. I've looked through getResources' rtfm but I can't find such way to show the connection between the article and the main container. Any idea guys?
Help will be much appreciated. Thanks!
you can get the parent-id of each Resource with
if you need the id of the ultimateParent you can use the ultimateParent-snippet in your getResources-tpl
if the id is not enough, you can combine this with the getResourceField-snippet to get any field of the parent/ultimateparent