Add custom CSS or javascripts

To add your own custom CSS style sheets or scripts to the SiteBuilder system:

  1. Log in to your site via FTP.

  2. Create a folder called /css/ and /scripts/ on your site. (Note: you can name these folders anything you'd like. Just change the references in this example accordingly.)

  3. Load all the CSS sheets into the /css/ folder and the javascripts into the /scripts/ folder.

  4. Select 'Templates' in the storeadmin area.

  5. Under 'Custom Templates', add references to the scripts to your template.

    For instance, if you want to add:

    css/style1.css
    css/style2.css
    scripts/script1.js
    scripts/script2.js

    to your site, you would add:

    
    
    
    

    just above the

    
    

    tag in your template.

  6. Click 'Update' to save the template.

Please Note:

If your custom style sheets use references to images, you must use the full URL in the style. For instance, you should use:

background-image: url('http://yoursite.com/images/background.png');

but do NOT use:

background-image: url('images/background.png');

This will allow the images to be seen on all pages, even those in a subdirectory.

Resellable Templates

If you are selling templates and you cannot add the URL into the style sheet, you can use PHP to get the information from each site on which the template is used. This will allow you to create SiteBuilder templates that can be used on any web site, without having to change it for each URL.

  1. Save your style sheet with a PHP extension (e.g. mystyle.php instead of mystyle.css) and load it into a /css/ folder on your site.

  2. Add the code:

    to the top of the page.

  3. In your sheet, use:

    in place of your URL. For instance, instead of using the background image:

    background-image: url('http://yoursite.com/images/background.png');

    use:

    background-image: url('/images/background.png');
  4. Reference your sheet with the .php extension. For instance, use: