Combining your files
Your project file (.WEB/.XAR) should contain all your pages within your website or document. If you have all your pages as separate .web/.xar files, this will make it very difficult to link together and will fill your hosting storage space with unnecessary files, as each file will upload a support folder containing all your images for each project file.
Combining your project files is easy.
- Rename all pages in each of your .web/.xar files except for your first one (normally your homepage).
- Copy the page (Ctrl + C)
- Open your first project file, click within the page and layer gallery and paste.
- Once all your pages are within one file file, save (File > Save).
You can now link all your pages easily together within the Web Properties dialog, and all pages will share repeating objects and components.
Splitting your files
If your website is becoming too large to handle within one file, it might be worth splitting it between multiple project files.
Before you do, to improve performance you can optimize all your images (Utilities > Optimize all images > Optimize), which will help reduce the memory usage of your file.
To split your project files:
- Open your project file and go to File > Save as. Rename this file and add _02 at the end
- You should now have 2 files, open both of them.
- In the first file (without the _02 at the end), delete the second half of your pages.
- In your second file (with _02 at the end), delete the first of your pages.
You now have 2 project files that make up your website.
Linking pages together
When splitting your website and deleting the pages, you'll see a message like this:
This is to let you know that any links to pages that have been deleted have been replaced with relative links. This means instead of using the link to page option to link to the page (which will automatically update if you change the page name), it will instead insert a link to ./[pagename].htm
This should enable all links to work as normal when you publish both halves to the same directory.
Likewise, if you wish to link pages from one project file to another, you'll need to manually link them together, either with the full URL (http://www.website.com/pagename.htm) or simply with ./pagename.htm if you publish all project files to the same directory.
Note: / to go forward a directory ./ indicates the same or current directory ../ to go up a level
Publishing your pages
You can publish both halves to the same directory without any problems, as long as you:
- Ensure you only have page 1 page called index
- Do not have any duplicate names in each project file, otherwise they will overwrite each other
It's important that you only have 1 page called index, as especially if you have fast publish turned on, it overwrite each other and delete pages that are not within the project file.
If you create separate directories for your project files, you'll need to manually update the links to each of the pages.
Robert Turner
Comments