Dynamic Content Object

Step 4 - Pages >

Dynamic Content Object

Previous pageReturn to chapter overviewNext page
Show/Hide hidden text

Once a website has been published on the Internet, there may be times when somebody other than the original author needs to update some parts of it. It may be the client for whom the website has been created, or members of an association who want to keep their website updated constantly with the latest news and events. Authorized users must be able to update certain parts of the website directly online, without necessarily having a copy of the program and/or project files, and without changing other sections or altering the overall graphic layout.

WebSite X5 makes this possible with the Dynamic Content Object. The website author can use the Dynamic Content Object to authorize named users to make changes to specific areas, whilst maintaining control over the project as a whole. This possibility offers two clear advantages:

the author saves time by delegating on-the-spot updates to others;
the website is kept constantly updated.
Click to expand/collapseReference: Settings for the Dynamic Content Object

To set up a Dynamic Content Object you must first define the Users, or User Groups, who will have permission to change the Object's contents.

A list of the existing groups and/or individual users can be seen in the Groups/Users section. Click on the groups/users you want to enable to modify the contents of the Dynamic Content Object so that a tick appears next to their names. Remember that enabling a group and enabling all the users in a group is not the same thing! Only in the first case, if you enable a group, and subsequently add other users to it, the new users will be automatically enabled to update the contents of a Dynamic Content Object.

To create new groups/users, go to the Access Management window in Step 1 - Website Settings | Advanced.

The Dynamic Content Object has the following Properties:

Height: sets the height of the Dynamic Content Object in pixels. If you fix a maximum height for the Object,  when the contents make it reach that height, a scroll bar will appear on the side of the window, thus maintaining the overall page layout.
Enable Automatic Height: if you select this option, the height of the Object is automatically calculated so that the entire contents of the Object can be displayed without having to show a scroll bar. This option is effective only if the Object is inserted in a line of the page layout table that does not contain other Objects.
Click to expand/collapseReference: How changes to Dynamic Content Objects are saved

In the Saving Data section you can indicate how the contents added by users enabled to change the Dynamic Content Object are to be saved:

Send data to a file: the contents are saved in a file created in the specified folder on the Server.

Send data to a Database: the contents are automatically sent to the specified MySQL database, via a specific PHP script.

You will need to specify some parameters, according to the method chosen for sending and saving data:

Send data to a file:

Folder on the Server where data is saved: specify the folder on the server (with PHP write access) in which the submitted data is to be saved. The main server folder name is specified by the Server folder with write access option in the Data Management window. If you do not specify a sub-folder, the data will be saved in this one.

Send data to a Database:

Database: select the database from the list of those linked to the project.
Tables Prefix Name: enter the name of the table in the database where you want submitted data to be added. If the table doesn't exist, it will be created automatically.

You need to have already compiled the list of databases linked to the project in the Data Management window.

Once you have set the parameters for configuring the Dynamic Content Object, click on the Preview button to display the website in the built-in browser. In the page that opens, instead of the Dynamic Content Object, you will see an invitation to write your text. If you move the mouse over this area, the space taken up by the Object is shown by a dotted line. Click inside this area to display the text editor with which to write your contents for this Object (a default text is shown and can be changed).

For this Object to work correctly, the page it is inserted in must be saved as a .PHP file.

Use the File Name Format option in the Page Properties | Expert window to specify page formats.

In the Dynamic Content Object section of the online Control Panel and the WebSite X5 Manager app, you can display a list of all the Dynamic Objects that have been added to the website: if you want to edit the contents of one of these Objects, click on its name to open the page where it has been inserted and make your changes.

 


Best practices:

-

How to work with the Dynamic Content Object


Further information:

-

The online Control Panel and the WebSite X5 Manager app