A recent comment by Martin Davies to this short post inspired me to take a subject that is always going to be a marmite one with us as Sitecore developers. So I will start by saying, firstly – this is not a dig at Martin in any way, I have met many developers that share the view made by his comment and that, this is very much subjective and a presentation of my view as a counter proposal – I personally have changed my mind a few times on this subject.
A ‘page structure’ as you Martin eludes to in his comment, is for my mind at least a collection of items which have presentation (generally making up the site map as we see it), as such (for me), it is a content structure like any other. I have seen on my travels both ‘page’ content structures with non-page items and ‘page’ content structures with items. I personally don’t feel the need to enforce a user to not put items without layout in some other place if the most logical place is potentially to keep it close to the item in question. I would say though – we as developers (and often users) like to see the world in our little silo’s and we can (if we think about it) get a happy medium. I will however qualify this further by looking at specific use cases, so lets consider some real world examples:
Free Text, Call to Actions & Carousels
Ok, so the first, and very common one would be a ‘free text’ item, these are usually items that are added ’cause we don’t want to add a specific field for 1 piece of text, so we create an item and use it as the data source on a ‘free text’ rendering. In my opinion, these (and this will be a marmite view I suspect) can live either in a ‘global’ location or beneath the page they are used, depending on whether the content will likely be re-used. This would probably also apply to the likes of carousels or call to actions.
Items like social media settings items (think twitter feed items for example) should almost always live in a more ‘global’ location.
Items For Structure
Well – when you think about it – as Nick has mentioned in his post here, Sitecore (in the words of Rocks) gets ‘grumpy’ when you start adding larger amounts of content under single folders (though I have found in reality you can usually get up to around 250 – 300 items without the users moaning). So we as developers often find ourselves creating (taking News or Events structures as an example) ‘Group’ items, such as ‘Year’ or ‘Month’ in order to split content for the user. These (in the majority of installations) are usually presentation-less content items – which is bad right? Well, no – most would argue it’s ok in this use case even if they share a hardline belief similar to that which Martin’s comment showed.
The happy medium?
Well, we have already established that (many of us) are happy to have items for structure on certain occasion, I (like some others) believe that its on the user to decide whether their content belongs globally or not, so why not…. Dun dun dun……. Mix the two and have a ‘page specific elements’ structure that a user can add beneath an item of content (side note, I personally like the blue folder icon for this – icons are important – just saying!). This is seemingly at first kinda still going against Martin’s shown ideal, but in reality – we are quickly back to our happy silo-ed existence, ’cause when we open the content tree we have a lovely little structure that shows us that a user has added some Page specific text, or a carousel, without having the (and like I said – I have changed my mind, cause I originally was happy with this) 5 – 10 additional free text / carousel / call to action items that make it harder to see the wood for the trees, especially when there are many other items. Add to this the help of the notable icon (whichever you may choose – *BUT CHOOSE THE BLUE ONE*), you can quickly as a developer or user, disregard it if its not what you are looking for.
As we are aware, the relationship between developer and user should almost always be the developer acting as an enabler for the user / end user, its on the user to know what they want from their site, how they want to present their business to their client. It’s on us as developers to make that happen. As such – I (certainly) as a developer / architect / whatever hats I have worn have learnt not to attempt to second guess what the user wants, I just want to give them a solution that allows them to be as free as they can be whilst not making my life a pain. The example above is one of many whereby I have kept adapting my idea’s (and it will no doubt continue) to allow the user to actually manage their own content without getting in my way, leaving me to do what I actually love doing and getting my hands dirty (coding amongst other things).
As with all of the things I speak of in our posts, I am not at all hard line on my views and welcome feedback (go on, I know this is a contentious one :D). As an answer to the title – in my opinion, we should detach ourselves from the idea that a Sitecore item is a ‘Page’.