Custom Content Types in Confluence
Asked by Aaron Cohen:

We are thinking of moving a very highly customized instance of Drupal over to Confluence. We actually have Confluence at our organization but nobody uses it really.

Drupal has the idea of custom content types, which are models of your content which you can define and create via the UI. For example, you could define a content type called "Recipe" and a user can create an instance of a reciple. When the user goes to add the instance of the recipe a custom form is presented with custom fields such as:

* Title
* Ingredients
* Steps
* Cooking temperature
* etc.

Drupal then stores the fields in the database and presents the recipe just like it would with a page but with the custom fields instead.

Is something like this possible in Confluence? It wouldn't necessarily require a user or admin to define the content type via the UI. The content types could be hard-coded in a plugin.


Answers:
author: Joe Clark
body: While not quite as advanced as the solution you are describing, [Templates](http://confluence.atlassian.com/display/CONF20/Working+with+Templates+Overview) and [User Macros](http://confluence.atlassian.com/display/DOC/Writing+User+Macros) can be used to achieve similar functionality.

There is some development work underway in Confluence to support true custom content types, but it is in early stages and we're not ready to announce anything or commit to public availability.

comments: author: Shannon Krebs
body: User macros are also not available in an OnDemand instance. <http://confluence.atlassian.com/display/AOD/Restricted+Functions+in+Atlassian+OnDemand>


author: Aaron Cohen
body: We are using download, we host it on our own servers...

How is the progress on this?


author: Joe Clark
body: Thanks for checking back :-)

We have basic support for custom content types in Confluence in 4.3 - this is a developer-focussed feature that allows plugin developers to store different kinds of content in Confluence and get some Confluence functionality (like labelling, attachments, comments and permissions) "for free".

This is still a basic implementation of this feature, as some things like editing the content type are not innately supported by Confluence and need to be handled entirely by the plugin.

We don't have any public documentation available for this yet, but I hope it will be available soon.


author: Joel Walker
body: @josephclark --just wanted to follow up on this with you as well since this seems to be an unsolved question. We are currently facing this exact issue. We figured out how to create custom content types in Confluence via templates/Blueprints, however we're trying to figure out how to get their custom icon attribute to show up / override the standard page icon in the system (for example, search results). Any help would be much appreciated!


author: resah
body: Over a year later, still no documentation one this ;)

And yes, OnDemand restrictions still apply, afaik.

If anyone is interested: I created a dummy plugin for custom content types, which is still far from a documentation, but at least a somewhat minimized example:

[](https://bitbucket.org/resah/confluence-custom-content-example)<https://bitbucket.org/resah/confluence-custom-content-example>

After implementing this, you might ask: "Nice, but how do I insert useful content in there?"

I tried embedding the Atlassian Confluence RTE into a plugin. Again, no documentation, but better than nothing:

[](https://bitbucket.org/resah/confluence-embedded-rte)<https://bitbucket.org/resah/confluence-embedded-rte>

Just wanted to let everyone know who stumples upon this question in search for custom content types ;)

Regards

Theresa

comments: author: Andreas Lekas
body: I have implemented a Custom Content type and also would like to use the RTE for that custom type. I began trying to extend the Page Confluence class, but the more I thought about it, the more I realized that was not the solution. So I'm taking a look at your code for the RTE and I really hope that it works for my purposes. Hopefully what you have in the repo is enough to get me going, so thanks in advance!!!


author: Joel Walker
body: Did you ever figure this out Aaron? We are currently facing this exact issue. We figured out how to create custom content types in Confluence via Blueprints, however we're trying to figure out how to get their custom icon attribute to show up / override the standard page icon in the system (for example, search results). Any help would be much appreciated! Cheers!


author: Shannon Krebs
body: Unfortunately as you are using the on-demand service you won't be able to install any plugins that might be able to help with this.

See: <https://confluence.atlassian.com/display/AOD/Atlassian+OnDemand+Plugin+Policy>

Your best option might be to use page templates, but that doesn't really go as far as you want with editing the data in a custom way after it has been created.

comments: author: Joe Clark
body: Ooh, well spotted. I missed the "ondemand" tag. :-)


Tags: cloud

confluence-cloud