help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Export of pages

 

Here the existing classes are described to give you an impression what is done and what can be customized. At the bottom you will find an description about how to create your custom exporter.

BaseContentSerializer

CategoryTree
Current category tree. If not passed in constructor = Registry.GetCategoryTreeManager().Tree.

RootNodeName
RootNodeName is the name of the parent element in xml file, e.g. Pages, Documents etc. This must be overridden in your custom class.

SpecialProperties
A list containing the names of properties that should be handled in an individual way. You can then override the function ConvertSpecialProperties to handle them the way you like.

CreateObjectNode
Create your custom object node in your overridden function.

AddObjectProperties
Reads the properties of given cmsObject and export them to Properties/Property nodes. If a property name is contained in SpecialProperties list, ConvertSpecialProperties is called for this property.

AddPropertyElement
Property node gets set here.

ConvertSpecialProperties
Override this function if you have special properties defined in SpecialProperties list. Here you can define what value should be exported for the given property.

AddCategoriesNodes
Creates Categories/Category nodes for all existing assignments the given element has. If no assignment exists, the node is not added to xml node.

GetCategoryPath
Gets path in tree from given category to its subtree root node.

AddRelation
Creates Relations/Relation nodes for all existing relations the given object has. If no relation exists, the node is not added to xml node.


 
PageContentSerialzer

RootNodeName
= Pages

SerializeObjects
True = axobjects are exported too (default)
False = only page properties are exported

SpecialParameters
A list containing the names of parameters of dynamic controls that should be handled in an individual way. You can then override the function ConvertSpecialParameters to handle them the way you like. Default the list contains "CategoryID".

CreateObjectNode
Creates a page node for given objects, adds attributes, properties, relations and content to xml node.

CreateControlNode
Creates appropriate control node for label, images etc.

CreatePlaceholderNode
CreateLabelNode
CreateImageNode
CreateFlashControlNode
CreateCustomStructuralNode
CreateCustomDynamicNode

Creates according node, see schema for reference.

CreateParametersNode
Creates Parameters/Parameter nodes out of given parameters collection.

ConvertSpecialParameters
Override this function to process your special parameters. Default the parameter "CategoryID" is processed.

SetAxControlStuff
Sets id=axid and templateId and cloneableName and category assignments for given control.

 

Custom Exporter

You can simple inherit your class from BaseContentSerializer or PageContentSerialzer. In web.config simple add export definition with your class.

<Xslt Type="Axinom.AECMS.WebControls.AxPage"
     Serializer="PremiumSample.BL.IO.PremiumSamplePageContentSerializer, PremiumSample.BL" 
     AxID="AxPagesContentXML"
     Description="Content XML"/>