Custom Article Fields

24-07-2014, 12:54. Author: dlestarter
Home » DLE Administrations » Custom Article Fields
Custom Fields, sometime called "Additional Fields" or "XFields", is the special extended plugins in Datalife Engine, when you post anything on your website you will have shortstory and fullstory fields for you and your members to add news and articles, however, you can create other fields to enter information, such as a link to the source or program, there is something extra that you want members to add in to specific fields and information you need for your website, custom fields is the extension for it and the best thing about custom field is that you have no limitation to add and specify any kinds of information you want and you have complete control in your site template designs to make it looks anyway you want, also the custom field is searchable by search module within DLE and other search function like Opensearch and modules like Search Cloud or recent search which is wonderful feature in DLE, the structure of the custom field is saved in simple text file (.txt) called "xfields.txt" which located within folder /engine/data/ and you can edit, modify, delete and reorder the fields in case you have created the field later but you want to move it to the top or second or so on...
Custom Fields or XFields in Datalife EngineCustom Fields or XFields in Datalife Engine
Custom Article Fields is the custom field manager for Posts - News - Articles of your website, the Custom Article Fields you have created will be automatically added to your form when you add news or article to your website on both frontpage and from Admin CP addnews using tag {xfields} in addnews.tpl and /engine/inc/addnews.php, but will not automatically display in your website when display articles and posts, you must specify the the fields to display in the following files on your theme folder The Custom fields will be automatically added to your form when you add news or article to your website on both frontpage and from admin cp addnews using tag {xfields}

Lets take a look on Custom Fields and how to work with it

If you have created some of custom fields you will see the list of them there, from here you can edit or remove them at any time you want, to add Custom Field, simply click on "Add New" button, in add field page you will have option to add custom fields as in screenshot
Add XFields in Datalife EngineAdd XFields in Datalife Engine
When you add news/articles you will see the XFields displaying like this:
XFields when Addnews in Datalife EngineXFields when Addnews in Datalife Engine

Sort XFields

Sort XFields in Datalife EngineSort XFields in Datalife Engine
Sort XFields is very easy in newer version of Datalife Engine starting with !0.0 to newest released versions will allow you to drag and drop like in screenshot above, then click "Save the Sort Order" button in the bottom, but on the older versions you have to select to move up and down one by one which sometimes it becomes difficult when you have lot of XFields.
Sort XField in older Datalife Engine versionsSort XField in older Datalife Engine versions

Go back