Content Type Management

Content Type Management 1.0.3

No permission to download
Compatible XF 1.x versions
  1. 1.2
Additional requirements
This add-on should only be installed by add-on developers who wish to manipulate or rebuild content types. There is potential to cause your XenForo installation to stop working properly if you were to delete or edit default content types.
Visible branding
No
This add-on is not affiliated with XenForo Ltd.

Currently the process to create and manage content types is a little bit "clunky".

You have to create the content type in the xf_content_type table. You then have to add your content type fields in the xf_content_type_fields table. You have to write SQL queries for your add-on installer. Finally for your own sanity, you'll want to ensure you've then rebuilt the content types cache.

This add-on is designed to make that process a little bit easier.

In the Development tab (Debug mode required) you will now see a new navigation item: List Content Types:

upload_2013-11-3_0-12-20.webp


From this page you can view all existing content types and fields. But you can also create a new content type:

upload_2013-11-3_0-26-16.webp


This adds the new content type to the list:

upload_2013-11-3_0-27-23.webp


You can now add a field. Select a field name from the list:

upload_2013-11-3_0-29-12.webp


Type a field value (class name):
upload_2013-11-3_0-31-25.webp


(The class must exist)

upload_2013-11-3_0-32-6.webp


Once added, the content types cache is rebuilt, and your content type should be ready to function straight away on your developer install. Once you've done the hard bit and populated the aforementioned class with some code, of course...

This add-on is not able to automatically populate your customer's installs with the content types, of course. They are not exported as part of the XML file, so they must be created via queries during install...

To make that even easier, this add-on can generate the SQL queries for you. Just click the SQL Code icon in the heading of your content type:

upload_2013-11-3_0-35-22.webp


I hope this makes your life as a developer that little bit easier!
Author
Chris D
Downloads
176
Views
2,150
First release
Last update

Ratings

5.00 star(s) 5 ratings

More resources from Chris D

Latest updates

  1. Fixed undefined index error and more

    Fixed an error when generating SQL code when a content type has no fields assigned. Disabled the...
  2. Small compatibility update

    Dynamically fetches a list of valid content type fields from the xf_content_type_field table.
  3. Selects default add-on ID if set in config

    Selects default add-on ID if set in config Thank you xf_phantom.

Latest reviews

Excellent add-on, a must have for add-on developers working with content types. Nice, easy to understand interface and the SQL code generation is a great feature.
Very useful add-on for developers!

It must be in the core of XenForo!
Installing now, wish I had used it for an earlier addon ;)
Very Useful! Thanks!
OMG ! Thank you Chris Deeming. This is just .... cool.
Top Bottom