Directus CMS - How to use to manage the pages of a site

Viewed 559

I'm new to Directus so I apologize for my probably trivial question.

I try to understand what is (if exists) the best way to manage the pages of a site with a lot of static textual content. Would it be better to create a generic "page" collection and a "content" collection for textual contents (which contains references to the previous one), or to create a collection for each page containing the contents directly inside it?

Best regards

1 Answers

Directus is very flexible, so really either data model would work — it really depends on the complexity of data. You could get away with a Collection of pages, each with fields like a title, metadata, and (most importantly) a WYSIWYG editor with all toolbar options enabled.

You can certainly go the relational route, with text "modules" that are used to build the page. In v9 Directus will add support for the "many to any" relationship, which will allow these page builders to link to content from different collections (eg: text, hero, video, quote, etc).

IMO, a WYSIWYG works pretty well for rich text, especially if you don't need to re-use modules across pages.

Related