Written and contributed by Leng Lui
Scenario:
"I want to put my whole site into Nucleus so it's easy to manage."
Solution:
There are many ways to handle this, but most of them involve using Nucleus' multiple blog feature. A typical site will be comprised of 2 types of pages - those that get updated constantly ("dynamic content" - e.g. a "News" page) and those that are updated rarely, if at all ("static content" - e.g. an "About Us" page). Thus we need at least 2 blogs; one for dynamic content and one for static content (see How do I use Nucleus to manage static content?).
Forum thread for reference:
http://forum.nucleuscms.org/viewtopic.php?t=4905
Method:
Let's start off with your static content. Follow the instructions in this FAQ article to move all your static content over.
Next, create a new blog for your dynamic content. If your content is going to be about the latest news, call it "News". If it's about updates to your site, call it "Site Updates". This will help you remember which blog is which if you decide to have even more dynamic content later.
This is the boring part: copying and pasting all your old content into your new Nucleus blog for dynamic content. Make sure you put each of your articles into a new item, instead of putting everything into one item.
Again, there are lots of ways to do this but the simplest one is to use an include file or the plugin NP_ExtraSkin. First, you need to create a new skin to hold your layout. Then, you can choose between
Using includes:
- split your layout up into two sections. The first section will be everything up to and including the opening container element for your content. The second will be everything from and including the closing container element for your content.
- save the first section into a file called header.inc and save the second into a file called footer.inc
- upload these files into your skin directory
- put <%parsedinclude(header.inc)%> into every skin part before the <%blog%> tag, and <%parsedinclude(footer.inc)%> after the <%blog%> tag.
Using NP_ExtraSkin:
- split your layout up into two sections. The first section will be everything up to and including the opening container element for your content. The second will be everything from and including the closing container element for your content.
- save the first section into an ExtraSkin called header and save the second into an ExtraSkin called footer
- put <%ExtraSkin(header)%> into every skin part before the <%blog%> tag, and <%ExtraSkin(footer)%> after the <%blog%> tag.
In the settings for your static blog and your dynamic content blog, change it to use your new skin by default.
Finished!
Congratulations! You have just converted your HTML site into Nucleus!
Further Reading:
A forum thread explaining a bit more about how the header and footer includes/ExtraSkin works to reproduce your original layout
- http://forum.nucleuscms.org/viewtopic.php?t=4996
![]()
Total votes: 6 - Rating: 5.00