help.axcms.netAxinom Logo
Save Save Chapter Send Feedback
KB10044: Changing type of the existing structure elements
If you change the type of a structure element from structural to static/dynamic in CmsSite.xml, current instances in the existing pages do not work as expected. To solve it you need to update them in the DB manually (AxStructureElement-table).

SYMPTOMS

You converted a structure element from the type Structural (.htm) to Static or Dynamic (.ascx). After deploying the new code the existing pages with the element added cease to work (they show HTML source code from the ascx-file instead of processed HTML).

CAUSES

Type of the structure element is stored with every instance of the element in the database, and this is not changed accordingly.

SOLUTION

Change the entries in the DB manually.

In the table AxStructureElement search for the records with ElementTemplateID matching your element ID (from CmsSite.xml). Change Behaviour from 1 (Structural) to 2 (Static) or 3 (Dynamic). Use the SQL statement similar to this:

UPDATE AxStructureElement
SET Behaviour = 2 /* or =3 */
WHERE ElementTemplateID = [your ID]

MORE INFORMATION: