Content Type in source control - best practice

54 views
Skip to first unread message

Arjen

unread,
Aug 14, 2017, 5:31:53 AM8/14/17
to dotCMS User Group
Hi all,

I've got a number of content types that I defined manually in the web portal during development/testing.
Now I've trying to find a way of getting the content type definitions into source control as well as deploying the content types to a staging server.

I looked at the Content Type REST API and I guess I can write a plugin that calls this REST API when it's deployed and by doing so makes sure my custom content types get created etc, but this approach feel a bit rough to me.

So, is there an 'official'/best practice way of deploying and managing content types and relationships?

Thanks
Arjen

Xander Steinmann

unread,
Aug 14, 2017, 6:04:23 AM8/14/17
to dotCMS User Group
There is currently no easy way to add Content Types (and many other things) to source control. You'd need to create your own way to export/import them to source control. We try to add all code in templates, containers, widgets and custom code fields to VTL files which can be exported to source control.

For deploying to another server you can use push publishing.

Kind regards,

Xander

Arjen

unread,
Aug 14, 2017, 10:07:27 AM8/14/17
to dotCMS User Group
Ah ok, thanks Xander.
I'll have to read up on that though but will give it a try.

Arjen
Message has been deleted

Pete DeGraw

unread,
Aug 17, 2017, 5:58:14 PM8/17/17
to dotCMS User Group
We have been wrestling with this since day one with our three environments. Our environments get out of sync regularly with our team of 6 developers. It's a major frustration with dotCMS' strange approach to Content Types. A JSON or YAML file would be much better in defining content types.

Will Ezell

unread,
Aug 17, 2017, 6:10:39 PM8/17/17
to dot...@googlegroups.com
Well, good news is that content types can be defined and managed in JSON in dotCMS 4.1:


On Thu, Aug 17, 2017 at 5:58 PM, Pete DeGraw <peted...@gmail.com> wrote:
We have been wrestling with this since day one with our three environments. Our environments get out of sync regularly with our team of 6 developers. It's a major frustration with dotCMS' strange approach to Content Types. A JSON or YAML file would be much better in defining content types.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+unsubscribe@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/28787468-1d5e-414e-abe1-d17ed8c1af62%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--






3059 Grand Avenue
Suite 410-B
Miami FL 33133
Main: 
305-900-2001 | Direct: 978.294.9429

   

Matthew Torrenzano

unread,
Sep 18, 2018, 4:05:35 PM9/18/18
to dotCMS User Group
Pete, did you ever solve this issue of putting content types in version control?

Will Ezell

unread,
Sep 18, 2018, 4:14:47 PM9/18/18
to dot...@googlegroups.com

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.

To post to this group, send email to dot...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Pete DeGraw

unread,
Nov 8, 2018, 5:56:19 PM11/8/18
to dotCMS User Group
Nope. And the docs (https://doc.dotcms.com/docs/latest/json-view-content-types) are out of date. There is no import / export of content types. Maybe just REST API interaction. Developers prefer binary files to version control not interfaces. Seems dotCMS doesn't want to solve this for developers.

Falzone, Chris

unread,
Nov 9, 2018, 11:32:38 AM11/9/18
to dot...@googlegroups.com
Pete,

There is stuff coming in the roadmap to address this.  At the bootcamp conference this year there was a demo around one implementation of this.  So, while, yes, dotCMS doesn't do it out of the box currently.  They are working on it, and you are free to implement your own way of handling this using the ContentType API.   The challenge in something like this is you could find 100 different ways to implement it based on each individual project/team's needs. While you and me might like a json representation, another team might want XML or yaml.  While I work out of github, some teams use internal gitlab repositories.  While I might choose to orchestrate this through AWS services, another team might want to use Google Cloud, and yet others would want a 100% dotCMS native solution.

So, at least if what was said at the conference about the roadmap for dotCMS can be trusted, dotCMS has heard and is working on it.  But if you really need it today .. the REST API is specifically designed for this purpose.  

Hope that helps!

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dotcms+un...@googlegroups.com.
To post to this group, send email to dot...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Christopher Falzone

Interactive Developer


A Q U E N T

Digital, Creative, and Marketing Talent


aquent.com

cfal...@aquent.com

Reply all
Reply to author
Forward
0 new messages