Introduction
This document shows how to implement a way to pick up all the elements from a folder, extract this information in XML format, sort all the elements choosing the criteria and display this information.
Prerequisites
This code was developed to solve the following problem:
* The customer organizes part of their website in sections
* Each section is created with a folder which contains components based on the same schema (for this case news).
* The customer wants to show each section in a different page.
* They don't want to add each component that they create in the page which displays this information, so just create the component in this folder and that's it.
* Finally, they wanted to sort this information using different criteria and also create pagination, so the result is presented as interactive content to the user, who can sort by different criteria.
* The presentation server code is C#.
1. To implement this solution the following actions must be done
* Create a schema to create the component for configuration. In this case will be composed by:
*
o FolderURI (Text)
o ItemsPerPage (Text)
o moreitems_lb (Text)
o readmore_lb (Text)
* Create the component for configuration
* Create the schema for create the elements that will be displayed. In this case will be composed by:
*
o Title (Text)
o Introduction (Text)
o DateOfPublication (Date)
* Create the folder where this components will be stored
* Create the components
* Create the TBB with the functions for process the information
* Create the CT based on the schema configuration using the functions explained
* Create the page and just add the Component for configuration + the component Template