Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Custom Content Types and Many to Many Relationships

Started by Muut Archive 11 years ago · 1 replies · 289 views
11 years ago

I've been following Grav's development for a while, reading the blog and docs, but I have not had a chance to try it out yet. I really like what I see, but there is a big blank spot regarding content and how it can be modeled. How would you go about defining a content type with a certain number of fields of various kinds and then relate it to other content types? How would you handle many to many relationships -- for example, authors to articles?

👍 2
11 years ago

Grav has a simple but surprisingly powerful system of taxonomy mapping built-in, and this will probably be able to achieve what you are looking for.

You can even dynamically create taxonomies for pages at run-time via plugin events. There is a good example of this in the Archives plugin where we dynamically set a month_year on each page so they can be queried and retrieved as needed.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1322 9 years ago
Archive · by Muut Archive, 9 years ago
2 918 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2922 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago