Back to Home

Integrating XBlog into a Custom Sitecore Project – Part 1

SitecoreXBlogHelixArchitecture

Integrating XBlog into a Custom Sitecore Project – Part 1

Sitecore Helix has provided us with a uniformity that has been great for the community. When XBlog was updated to Sitecore 9 and converted to Helix standards I had a great opportunity to implement XBlog in a non-traditional manner. The project was a news based project that had blogs in mind.

Articles vs Blogs

So one of the first things we determined is that we didn't want to call anything a blog. The term article is much more neutral, and having our authors interact with items labeled articles is a lot more intuitive then blog. It was determined that all naming conventions from blog to article would be changed. This was done with namespaces, variables, and Sitecore items. The process was fairly simple with a search and replace, then working through compile errors. The main thing to look out for is plural naming (Blogs vs Blog and Articles vs Article). This essentially burned any bridge of upgrading to the latest version of XBlog in the future. If we were doing a straight blog, upgrading would make sense. But in our scenario we have already customized XBlog beyond any possibility of upgrade. But that's ok as we can still cherry pick future changes.

What was used

Roughly 70% of the foundation layer was used. I'll be going through these items at a high level as most of the work was done at the feature level.

Bucket publish date structure – XBlog has some logic onSave to structure your items in bucket folders based on year, month, and day. This is pretty nice when you don't want to sift through thousands of items from the backend. It really has no relevance from the front end.

Wildcard link mapping – The routing used for /category/<name> and /tag/<name> were re-used for this project.

Bucket search customization – This was a big one as there was a lot of base filtering done that we were able to use. Search by category, tag, and author.

Templates – Pretty obvious. We wanted to use the vetted templates that XBlog provides us. This gives us a great base line of fields to work with.

Wordpress importer – To get the articles into Sitecore, we made use of the XML import functionality that XBlog provides. This was extended to manage the thousands of articles that needed to be brought in. We also made use of the category, tag, and author logic.

What was not used

Roughly 0% of the feature layer was used.

Model classes – In XBlog the models are manually built. In our implementation we make use of TDS and Glass to generate our model classes.

Views – Views in XBlog are very generic. There really wasn't a lot of similarity to what we were building.

Configurations – Settings for XBlog use configuration settings files. We moved to item settings and rendering parameters.

CSS – XBlog has very basic css. This was not needed for our implementation.

In my next article I'll go through the details of how these items came together.