Documentation | Advanced Web Content Management
SpryPanel Documentation -> 3.1. Setting up SpryPanel

SpryPanel Documentation | 3.1. Setting up SpryPanel

As a pre-cursor to this chapter in the documentation, please make sure that you have read section 2.1. Understanding SpryPanel content. You need to be aware of what content elements, standard content and list content are. A brief reminder:

  • Standard content - A set of content elements that can only be edited
  • List content - A set of content elements where you can add, edit and delete any number of items in the list (an item is an instance of the list content elements).
  • Content elements - We break content down into content element blocks. For example if we have a page where you want a title and a block of text you would have two content elements.

It might be a good idea for you at this point to sketch out your content page so you know how many content elements, and what type of content elements you want. This might also help you when it comes making up your design. Note that you can start with the design and then add SpryPanel to control the content, its up to you - SpryPanel is designed with complete flexibility in mind.

To set up SpryPanel content control you first need to add that pages that you want to control in SpryPanel (note that SpryPanel ships with an 'Index' page already set up). To do this, click on the 'Add new page' link under the 'Administration Control' on the SpryPanel file view page. Once you have clicked on the link you will be taken to a page where you can fill out a field for the new page's name.

 There are three levels of pages in SpryPanel. The first is the index page, then you have category pages and then sub-category pages. This makes up a higharchial page set up. To add a category click fill out the field fore 'new topic page name' under the 'Add new topic page' section. To add a sub-category page click on the category that you want add the new page to, and then add the name to the 'New sub-topic page name' field in the 'Add new sub-topic page' section. You will need access privileges to add a new page, either content your system admin, or log in with an account which has privileges.

The next step, for each page that you have, is to define the content elements so that users can then click on the content editing icons and edit the content on your site's web-pages. To do this click on the 'Edit page design' icon (the small document icon) opposite the page name that you want to edit. You will then be taken to the page where you define the page's content elements.

This page can appear quite daunting at first, however if we breaking it down you'll find that it all makes sense :-) . The standard content elements and the list content elements work in more or less the same way, so here we will just talk about the standard content elements. When you have just created a page you will find the document design page looks like that shown in the figure above. It shows that you currently have no content elements assigned to this page. To add new content elements to your web-page type the number of them that you require into the add box under the 'Standard content elements' section. Then click the 'Add elements button. The page will reload and your new content elements will appear. You now need to fill edit each element to fit what you require on your web-page. The following table explains each part:

Element number The element number describes the order in which the content elements will appear on the the content editing pages. You can change the order, just by changing the element number from the pop up list.
Name The element name should be a short descriptive name which will indicate what the element is for when used on the content editing pages.
Database name The database name is the name that you will use to call the content out of SpryPanel and on to your web-page (you can learn more about this on the 'server side variables' page. You should make this a short simple name with no spaces.
Type
Text Used for a small amount of text, suitable for headlines etc.
Textarea For large blocks of text
Uneditable This is used solely for organising the content editing pages. It can be very useful if you have a large number of content elements.
Spacer Like 'uneditable' this is also used solely for organising the content editing pages. It introduces a space in between content elements where it is used.
Password A simple text input with the inputted characters disguised.
Multi A multi choice pop up menu. To specify the choices in the 'default value' field type of the choices separated by '::' (for example '1::2::3').
Hidden A hidden variable that cannot be updated from the content editing pages. It will always assume the default value.
File Allows you to upload a file to the web server. There is often a limit of around 3Mb on the file size, although it depends on your server.
Date For time and time fields.
Image This will let you upload an image to the server and then use it on your web pages.
        
Default value The default value is the value that the element will assume if there is not already data set for that item. For example you might want to set the default value for a link content element to 'http://'.
Description The description field is used as a description of what each element is used for. It not essential to set it, but it can be useful.
Used in list Under the 'list content elements' section there is the extra option of 'used in list'. If this is checked then the data from that content element will be used for the selection pages when editing or deleting a list item.
Remove To remove a content element for the page, just select the 'remove' button for the one that you want and click the 'edit page design' button. Note that this action cannot be undone.


The figure opposite shows an example of a document design. Note that in there is a difference between the list and standard content elements. There is an extra field called 'Used in list'. If this is checked then the data from that content element will be used for the selection pages when editing or deleting a list item.

The last step in setting up your document design is to set the web-page link to the document where you are going to use the content. You don't need to set this, but it can be useful. When set it will let you click on the page name on SpryPanel's file view page and be taken to the page directly.

Once all of this is done, click on the 'Edit page design' button. You can of course change the page design and content elements as much as you want. You can check the 'remove' box to delete that content element. And that's it!

<-- 3.0. Setting up a Web-site 3.2. Including Controlled Content -->