Styles
Second to the ability to create pages on the system is the ability to create styles. Styles can be used in many ways. for example
- Creating the Menubars, and basic page layout such that the page content is just the 'component' that differs on each page.
- Creating a Set of HTML components that make up a page, and then using the 'child style' feature to create different versions. - note the more elements you use the more difficult it can become to 're-assemble' the page for significant design changes.
- Using elements with code snippets to create 'rows' in tables or standard layouts for 'articles to be displayed on pages'; - this is similar to the 'NEWS' system that was developed.
From our experience, it is better to keep the number of elements that make up a page to the miniumum neccessary (As mentioned above, making changes to the page layout can become difficult) - dont get carried away!
Child Styles
Another of the powerful features of Midgard is the concept of child styles - the basic idea is that you can create a style based an existing one. It depends on the use of style elements to do this.
A new child style will have no elements, however when it is used (eg. tell a page to use it as it's style) it looks the same as a parent. The idea is based on the C++ and Java object orientated programing concept of inheritance - without reading about this, basically, a child style has all the elements of the parent, however you can redefine them or just use them to build a child style. have a look at the Concepts & Features section for a more detailed explanation
The ROOT element of a Style is very important, as it is the one neccessary to display a page. (eg. no ROOT element - will mean that nothing will be displayed (except the content of the code-init of the page).
Features
- The Style edit view is split into the top navigation bar, and the editing/ viewing window. When visiting the Style edit view the default is for the preview to be displayed. - this preview is a 'generated', not real view of the page - so it may differ from the final result (this may be changed in the next version)
- The system introduces the concept of shared styles - these are styles created by the SG0 group, and can be used by any other Company/Sitegroup, this is controled by a parameter on the Style definition - not directly accessable by the system.
- The Style edit view is actually a hybrid of the ROOT element editing and the Style editing. - done to make using the system easier. Other than this, style and style element editing share the same interface.
From the top navigation bar you can
- Preview the Style or Style element (again this is a generated view, not the real one, some javascript, and may display as text, other components may not work) - To view the page properly you will have to assign it to a page and visit that page.
Edit the Style or Style element
- change the name of the Style or Style element
- Edit the content of the element using the DHTML editor, (see notes about DHTML editing on the Website page.)
- See and edit the source code from the DHTML editor
- See the previous/current version of the source code
- list the other elements and create new elements
- create and list all the child styles of this element
- Create and modify User defined parameters of the style
- View the history and jump to the history view.
- delete the style element (Note, users must delete all elements prior to deleting the containing style) - Adminstrators may delete the whole style in one go!
Review the history of changes to the style and revert to a previous version.
Upload images/attachments to the style (refer to Website information for more details)
- Create a New Style
- Delete a Style
- Edit a Style
- Preview a Style
- Style Elements
- Style Revision Control
- Styles
- View/Modify Style Details
