Best practice - Pages / Data

In most of our setups we have 5 website pages and 5 data pages. Is it a good idea to prefix them with data- so that we can identify, filter them easily?

Example:

  • Page blog will show it’s own fields and also the content of Page data-articles

(For some data its more appropriate to use a field structure directly on the page)

How do others make this separation?

I’d say do what works best for you, I personally wouldn’t see a need for such a distinction, but that’s up to you. I guess you are talking about blueprint/template names, not page folder names?

1 Like

Another example:
We have a page with a template data-call2actions, we use this to store all our Call2actions.
Then we link this page in another (website) page to select the call2action for that page.

We will then need to block the route to the data-call2actions in the config file? We will block all templates that are prefixed with data-

Yes, either in the config or in a template/controller/snippets based on (partial) template name

Thank you so much for the relevant & fast replies.

Last question: How to store contacts from contactforms?
Is the best way just create a page Contacts with in our case data-contacts template, block the route or is there an alternative?

Yes, subpages are an option, maybe even a structure field (although I wouldn’t use this for a huge number of data). Other options: database (e.g. sqlite) or a remote service to store the data.

What is the most used concept? What do you recommend? How do you store contacts? :slight_smile:

I’ve done multiple: simple log; add to CSV, push to a service endpoint, send via email to a mailbox, …

1 Like

Thank you Bart. Check mail