A fresh install of Concrete5 includes a "Right Sidebar" page type. And if you choose to install sample content, you'll also get "Blog Entry", "Full", and "Left Sidebar". It's probably in your best interest to keep those page types around if your theme is intended for the marketplace. But when you're building a custom theme for a specific site, you'll likely want to define your own. For instance, why keep the "Right Sidebar" page type around if your design doesn't have a right sidebar?
C5 makes it easy to remove a page type. But you may get hung up the first time (I did).
Setting the Stage
For this example, let's takeĀ a clean C5 install (without sample content). You'll have one page (the Home page) and one page type (Right Sidebar). We'd like to keep the home page, but get rid of "Right Sidebar" page type.
My Approach
A page type can be deleted, but only if it's not in use by any pages. Since "Right Sidebar" is applied to the "Home" page, we'll need to give the "Home" page a different page type first. So, create a new page type (like "Home") and update the "Home" page to use that new page type.
Now, you might think that "Right Sidebar" can be deleted at this point. But not quite. This part wasn't immediately obvious to me my first time (no error messages). You see, the "Right Sidebar" is still in use by a "version" of the "Home" page (with good reason). So, you need to delete the previous version(s) of the page that had the "Right Sidebar" page type (be careful you didn't need that version for any reason). Once that's done, you can delete the "Right Sidebar" page type.
Another Approach (much simpler)
In the middle of writing this, Jordan shared his approach. Instead of creating a new "Home" page type, he just changes the "Right Sidebar" page type's name to "Home" and handle to "home". Facepalm. That is a much simpler approach.
Final Thoughts
The second approach is probably the route to go (and the one I'll take) most of the time. But you might find the first approach helpful in situations where you're further along in the process and need to do a lot of page type cleanup.
Comments
Commenting has been disabled.