Sueetie has always supported ScrewTurn Wiki 3.x's Multiple Namespace architecture. It’s a very cool, very powerful feature. A sticking point, however, was that ScrewTurn Namespaces other than the root broke the page layout. Specifically, the page elements created by ScrewTurn to support the namespace didn’t conform to the custom styling of the page elements used by the root namespace.
This happens whenever the root page element files are customized in a ScrewTurn Wiki, but Sueetie v2.3 includes a utility to make ScrewTurn Namespaces play nice with Lollipop, or rather, the customized version of Lollipop on your Sueetie site.
I created a ScrewTurn Wiki Namespace on Sueetie.com called “Sueetie Insiders.” Here’s a screenshot where you can see the “Sueetie Insiders” designation and how the page sweetly conforms to the site’s custom theme.
Below is the new ScrewTurn Wiki How-To Guide on Creating ScrewTurn Wiki Namespaces in Sueetie v2.3.
ScrewTurn Namespaces were part of ScrewTurn Wiki since v3.0. While they were supported in Sueetie prior to version 2.3, this guide tells you how to use your existing page elements in your ScrewTurn Wiki Namespaces without breaking your page layout.
The process includes 1) Customizing Sueetie page element template files for your site, 2) Creating the Namespace in ScrewTurn Wiki, 3) Executing a Sueetie NameSpaceIt.cmd to update your ScrewTurn page element files, and 4) Replacing your /wiki/public/namespace.cs page element files with the Sueetie-created template files.
ScrewTurn Wiki Page Element Files for Namespaces
We're going to create a namespace called "Sueetie Insiders." When a namespace is created, ScrewTurn creates a /wiki/public/pages/NAMESPACE folder for the namespace as well as page element files that are used for that namespace. Here's a screenshot of those files for Sueetie Insiders.
The problem is that the page elements break existing theming because we're using custom themes that are not out-of-the-box.
The solution is to create page elements for use by ScrewTurn namespaces that conform to our customized elements.
Sueetie Template Element Files
Sueetie Template Page Element Files are located in /wiki/themes/lollipop/NameSpaceIt as you see below. You'll want to copy these to your PC and modify them to adapt to any custom styling you applied to sidebar.cs, header.cs, etc.
Once you customized the SueetieTemplate.*.cs files for your site you will follow the simple process to create a namespace with theme-supporting page elements outlined above. 1) Create the namespace in ScrewTurn, 2) Run the NameSpaceIt.cmd to create your namespace elements, and 3) FTP those files to your site, replacing the files created by ScrewTurn Wiki.
Create the Namespace in ScrewTurn
We'll begin by creating the namespace in ScrewTurn Administration as shown below. Be certain to conform to the exact name you gave the namespace in case.
Sueetie has always supported ScrewTurn Wiki v3.x's Multiple Namespace capabilities, but until the most recent Sueetie v2.3 release any wiki namespace other than the root namespace broke the page layout. Specifically, the page elements created to support a new namespace had different layouts than those Sueetie-customized elements used by the root namespace.
NameSpaceIt.cmd makes a copy of your modified SueetieTemplate.*.cs files for uploading to your /wiki/public folder. It takes one parameter, the name of your new ScrewTurn Namespace, in our case "Sueetie Insiders." Below is how you would use NameSpaceIt.cmd and the resulting new files created.
Now upload the new "Sueetie Insider.*.cs" files to /wiki/public, touch the /wiki/web.config and you'll find that your new namespace is theme complete!
Sidebar: Namespace Permissions
This is a side point, but you will typically want to implement some sort of user access restrictions on ScrewTurn Wiki Namespaces. If you recall, ScrewTurn-specific accounts are created optionally based on your Site Wiki Account Creation Setting in Sueetie Administration. You can read more about ScrewTurn accounts in Scalable ScrewTurn Wiki Membership Model. To use ScrewTurn permissions, you must enable wiki account creation in Sueetie Administration, or at least create accounts for those you wish to give access to any ScrewTurn Namespace.