SiteStudio Online Documentation

Adding a new category to SiteStudio.

To create a new category for SiteStudio (similar to business or personal) and call it, say, 'On-line business', you should do the following.

  1. Make changes in the simple.xml file.

    Open the file templates/simple/simple.xml (make sure you're in the SiteStudio home directory). You can use your favorite text editor (it should save files in the plain text format without any formatting) Alternatively, to edit this file, you can use any XML editor.

    Find the following lines:

    <child name="personal" page="personal">
        <addpage name="security"/>
        <addpage name="robot"/>
    </child>
    
    <child name="business" page="business">
        <addpage name="security"/>
        <addpage name="robot"/>
    </child>
    

    And add after them:

    <child name="online_business" page="online_business ">
        <addpage name="security"/>
        <addpage name="robot"/>
    </child>
    

    (you can insert these lines before the website personal and business childs)

    Next, add category definition. You can duplicate business category definition and make changes for its pages. To do this, copy all content from the lines:

    <!-- Start of Small Business (SB) Category Definition --> and <!-- End of Small Business (SB) Category Definition -->

    You'll get text like this one and paste it under the online_business child definition.

    Then change the name of category definition:

    <page name="business" class="psoft.masonry.StylePage">
    with
    <page name="on_line_business" class="psoft.masonry.StylePage">

    and small.business variable with the on_line.business:

    So, with

    <title><var>small.business</var></title>
    <description><var>small.business</var></description>
    

    you'll get:

    <title><var>on_line.business</var></title>
    <description><var>on_line.business</var></description>
    

    Later we'll add on_line.business variable into lang.properties file.

    Another way is to build the structure of pages one by one. After the online_business child definition add:

    <page name="on_line_business" class="psoft.masonry.StylePage">
        <title><var>on_line.business</var></title>
        <description><var>on_line.business</var></description>
        <param name="firstLevel">true</param>
        <child name="robot" page="parent.robot" maxcount="1"/>
        <child name="security" page="parent.security" maxcount="1"/>
    

    (As you see, we need to define robot and security pages with every new category).

    Add the 'About' page with plugins allowed:

    <page name="about_me" class="psoft.masonry.HierarchicalPage">
                <title><var>About</var></title>
                <description><var>About</var></description>
                <param name="plugin_spots">
                    <value>top right</value>
                    <value>mid right</value>
                    <value>bottom</value></param>
                <param name="supported_plugins">
                    <value>poll</value>
                    <value>cownter</value>
                    <value>guestbook</value></param>
    </page>
    

    and 'Generic' page with subpages:

    <page name="gpage" class="psoft.masonry.HierarchicalPage">
                <title><var>GenericPage</var></title>
                <description><var>GenericPage</var></description>
                <param name="alt"><var>Other</var></param>
                <param name="supported_plugins">
                    <value>poll</value>
                    <value>cownter</value>
                    <value>guestbook</value></param>
                <param name="plugin_spots">
                    <value>bottom</value>
                    <value>top right</value></param>
                <child name="paragraph" page="paragraph"/>
                <page name="paragraph" class="psoft.masonry.TransparentPage">
                    <param name="nomap">true</param>
                </page>
                <child name="subpage" page="subpage"/>
                <page name="subpage" class="psoft.masonry.HierarchicalPage">
                    <child name="paragraph" page="paragraph"/>
                    <page name="paragraph" class="psoft.masonry.TransparentPage">
                        <param name="nomap">true</param>
                    </page>
                </page>
    </page>
    

    and, add another page called, say, 'Welcome':

    <page name="welcome" class="psoft.masonry.HierarchicalPage">
                <title><var>Welcome</var></title>
                <description><var>Welcome</var></description>
    </page>
    

    So 3 page types will be available for users to add in the On-line Business category. You can define as many pages as you want, similar to the way it's defined in the existing Business and Personal categories.

  2. Add new variable to the lang.properties file:

    Find the line:

    small.business=Business

    Add the following under it:

    on_line_business=On-line Business

    If you have other languages available in your SiteStudio (your local languages), you should add the on_line_business variable to the language*.properties files as well.

  3. Create directories and files for the templates of the new category.

    So, files for old-style SiteStudio designs will be stored in the templates/simple/online_business directory and new-style designs will be stored in the templates/simple/online_businessnew category.

    If you copied the business definition in the simple.xml and made it online_business, you can copy templates/simple/business directory (with all its files) to templates/simple/online_business

    If you didn't copy the whole structure from business (or even personal) category in the simple.xml, you just need to copy a few directories that contain the pages you've added to your new category.

    So, if you define only 'About', 'Generic' and 'Welcome' pages, you just need to create templates/simple/online_business directory and copy:

    templates/simple/business/about_me to templates/simple/online_business/about_me
    templates/simple/business/gpage to templates/simple/online_business/gpage
    and
    templates/simple/business/welcome to templates/simple/online_business/welcome

    Also you need to copy all business* files that are stored in the templates/simple/business/.

    Rename all business* files (just copied to templates/simple/online_business directory) to online_business*.

    You should get something like this:

    online_business.layout.list
    online_business.settings.edit
    online_business2.edit
    online_business3.edit

    Open the file online_business.edit and change the line

    <assign category="business">
    to
    <assign category="online_business">

    All lines from the online_business.layout.list file should be removed. Later you'll add new designs into it.

    You need to restart SiteStudio and start building the test site.

    If you've done everything properly, you'll see your new category on the 'Select Website Category' page.

    Now you can add new designs into your new category following this doc.


See also

Product Page
Online Demo
FAQ
SS Doc Home



Copyright 1998-2008. Positive Software Corporation.
All rights reserved.