This tutorial will guide you step by step in creating a custom theme for your InterWorx system. Custom themes can be used for re-branding the system for your customers, or just to create a custom look and feel.
With the release of InterWorx 4.0, the theming system has been simplified while increasing the flexibility of user themes. Unfortunately, some older custom themes are incompatible and will need to be upgraded.
The InterWorx theme system is used in the themes that ship with InterWorx. The "InterWorx" theme is the root theme - all other themes are based on this theme.
Every theme is comprised of several important elements. Customizing your new theme is simply a matter of changing some aspects of these elements.
Element
Location
Role
Base InterWorx CSS
Not part of download
Provides the base look and feel for most elements. This is not editable, and must be overridden in your theme CSS if desired
NodeWorx CSS
/nodeworx/theme.css
This CSS file is the heart of your theme. Loaded after the base CSS, it's the place to go to for creating a custom look. This file is actually loaded for both NodeWorx and SiteWorx, and may be all you need to edit.
SiteWorx CSS
/siteworx/theme.css
This CSS file is for SiteWorx-specific modifications for your theme. It's loaded after the base CSS and the NodeWorx CSS. This file generally has the least data in it - for some official InterWorx themes it's actually empty!
NodeWorx Images
/nodeworx/images/
Folder containing all images accessible to your theme for NodeWorx.
SiteWorx Images
/siteworx/images/
Folder containing all images accessible to your theme for SiteWorx.
The first step in creating a custom theme is downloading an existing one. InterWorx leverages the "Cascading" part of "Cascading Style Sheets" to allow new changes to be built upon the existing styles and layout.
The simplest form of customization is to replace the InterWorx logo and SiteWorx/NodeWorx logos with your own. In each theme, there are two images for NodeWorx and two for SiteWorx that are the logos used in the headers. These are "hd_left.gif" and "hd_right.gif".
Simply edit or replace these images with your own (must be .gif format) and edit the manifest file before uploading your new theme!
Another possibility is to use a different file entirely, and not convert to .gif. This lets you use higher-resolution images, such as PNG or JPG.
Put your new image in /nodeworx/images
Open /nodeworx/header.tpl in the download
Find hd_left.gif or hd_right.gif
Replace with your new image name
Repeat for SiteWorx, if desired
The header and footer are not rendered as part of the csstest.html file included with the download. You'll need to complete your theme and upload it before you'll be able to see the differences
All colors and graphics other than the header logos are assigned and positioned using CSS.
Use of the Firefox plugin Firebug is highly recommended.
To customize your theme, the best place to start is the NodeWorx theme.css. Any changes to SiteWorx specifically should be made in the SiteWorx theme.css.
In the /nodeworx/ folder of the download, you'll find an html file called csstest.html. This file has been specifically altered to work from your local machine, so that you can test some base elements of your custom theme without the trouble of zipping up your changes and uploading them repeatedly.
Simply open the file in your browser to see most changes as you make them. Changes to header.tpl and footer.tpl will not show up, sorry.
In the /nodeworx/images/ folder, there is an image called thumbnail.jpg. This image is used to show a preview of your theme on the Theme Management page. The image will ultimately be displayed at 320x262 (roughly 25% of 1280x1024) so that's the best size for the least distortion.
Once you've changed all your images, you'll notice a manifest.txt file in the /nodeworx/ folder in the zip file you downloaded. This file is used to tell InterWorx some information about your theme. Open this file in your text editing program and edit it according to your preferences.
Now, you've edited the style sheet and the images according to your preference. For the most part, you're finished making your theme. Now you need to zip the folders up and upload them.
Select the siteworx and nodeworx folders on your desktop.
Right click on one of them and you should see the option 'Send To'. Select this option and then you should see 'Compressed (zipped) folder'. Select this option and in a couple seconds, you should see a file on your desktop called siteworx.zip or nodeworx.zip depending on which one you right clicked on.
Rename this file to whatever you named your theme.
Create a Custom Theme
This tutorial will guide you step by step in creating a custom theme for your InterWorx system. Custom themes can be used for re-branding the system for your customers, or just to create a custom look and feel.
With the release of InterWorx 4.0, the theming system has been simplified while increasing the flexibility of user themes. Unfortunately, some older custom themes are incompatible and will need to be upgraded.
The InterWorx theme system is used in the themes that ship with InterWorx. The "InterWorx" theme is the root theme - all other themes are based on this theme.
How Themes Work
Every theme is comprised of several important elements. Customizing your new theme is simply a matter of changing some aspects of these elements.
/nodeworx/theme.css/siteworx/theme.css/nodeworx/images//siteworx/images//nodeworx/header.tpl, /siteworx/header.tpl/nodeworx/footer.tpl, /siteworx/footer.tpl/nodeworx/manifest.txtDownload an Existing Theme
The first step in creating a custom theme is downloading an existing one. InterWorx leverages the "Cascading" part of "Cascading Style Sheets" to allow new changes to be built upon the existing styles and layout.
Download the Theme
Changing the Logos
The simplest form of customization is to replace the InterWorx logo and SiteWorx/NodeWorx logos with your own. In each theme, there are two images for NodeWorx and two for SiteWorx that are the logos used in the headers. These are "hd_left.gif" and "hd_right.gif".
Simply edit or replace these images with your own (must be .gif format) and edit the manifest file before uploading your new theme!
Changing the Logos: Advanced
Another possibility is to use a different file entirely, and not convert to .gif. This lets you use higher-resolution images, such as PNG or JPG.
/nodeworx/images/nodeworx/header.tplin the downloadhd_left.giforhd_right.gifChanging the Colors and Graphics
All colors and graphics other than the header logos are assigned and positioned using CSS.
Use of the Firefox plugin Firebug is highly recommended.
To customize your theme, the best place to start is the NodeWorx theme.css. Any changes to SiteWorx specifically should be made in the SiteWorx theme.css.
Changing the Layout
Changing the layout is possible in two ways: CSS, or editing
header.tplandfooter.tpl. Changing the layout is beyond the scope of this tutorial.Using csstest.html
In the /nodeworx/ folder of the download, you'll find an html file called csstest.html. This file has been specifically altered to work from your local machine, so that you can test some base elements of your custom theme without the trouble of zipping up your changes and uploading them repeatedly.
Simply open the file in your browser to see most changes as you make them. Changes to
header.tplandfooter.tplwill not show up, sorry.Update the Thumbnail
In the
/nodeworx/images/folder, there is an image called thumbnail.jpg. This image is used to show a preview of your theme on the Theme Management page. The image will ultimately be displayed at 320x262 (roughly 25% of 1280x1024) so that's the best size for the least distortion.Edit the Manifest File
Once you've changed all your images, you'll notice a
manifest.txtfile in the/nodeworx/folder in the zip file you downloaded. This file is used to tell InterWorx some information about your theme. Open this file in your text editing program and edit it according to your preferences.manifest.txt entries
[vanillaice]nameauthorhd_left_urlhd_right_urlhelp_urlAll other directives in the manifest are not used in InterWorx.
Upload/Add Your Theme to InterWorx-CP
Now, you've edited the style sheet and the images according to your preference. For the most part, you're finished making your theme. Now you need to zip the folders up and upload them.
Zip Your Theme
Add Your Theme
Select Your Theme