Modx: If You Use Articles As The Site Start You Might Have Problems With Archives And Tags
Posted on Jun 22, 2014 by Mike Nuttall
Leeds web design: tips for MODX blogging plugin: Articles
Articles is a blogging plugin for MODX, my content management system of choice.
It is the plugin I use for this website. It allows you to set up a blog and gives you all the tools you need to blog on a regular basis. (And you can't get any more regular than every day!)
One great thing about Articles is that it allows you to set up individual blogs on the same website. For example I have three on this website, this daily journal, my regular blog with advice for small businesses and my technical blog that is dedicated to articles about MODX. They all have distinct goals so I wanted to keep them seperate, but they are all on the same website so can contribute to the overall authority of the site.
Keeping a blog has become very important for small businesses. It gives them the opportunity to keep their website fresh, provide their users with useful information and gives the company a chance of doing well in the search engines by contributing quality content to their website thus improving the on-site search engine optimisation.
So one option is to make the main focus of a company website be the blog, in fact their website essentially is a blog, rather that the blog just being part of the overall site.
So this is quite possible with MODX, just make the blog the site_start . ( This is the system setting that tells modx which page is the root page of the website)
But this causes a problem because Articles isn't used to being the site_start. The site_start page is treated slightly differently than other pages in the website, it is treated as the root domain, ie in the case of this website that would be http://onsitenow.co.uk, so it usually misses out the alias of the home page. But Articles relies of the alias as the folder in which all the blog posts reside. The upshot of this is that when you try to implement the archives and tags that go along with the blog, the links don't work.
This is easily resolved though you just need to redirect the default links to the new url taking into consideration the fact that the alias is being ignored.
If your server is running Apache you can do this by editing the .htaccess file, this is how I did it for TLC Office Supplies website:
RewriteRule ^([0-9]{4}/[0-9]{2})/?$ http://tlc-office-supplies-yorkshire.co.uk/home/$1 [L] RewriteRule ^(tags)/(.+)/?$ http://tlc-office-supplies-yorkshire.co.uk/home/tags/$2 [L]
Hope that helps.
Web development today:
Jun 22, 2014
What did I do?
7 hours 19 minutes | This website: creating blog post ideas and creating outlines and content, updating blog, checking rankings |
38 minutes | Checking client site |
37 minutes | Social media |
Total: 8 hours 35 minutes
Mostly creating blog posts for the next 5 days, I prefer being ahead of the game
Exercise: Rest day :-)
Tomorrow: More javascript stuff.