This post is as much for me as it is for anyone else. This site is “powered” by Joomla, a very powerful, useful and versatile content management system. One of the most versatile aspects of Joomla is the ability to apply templates to your site to change the look and feel at the click of your mouse. One of the free to use templates out there is called “JA Purity II” and you are currently looking at a version of it that I have customised.
Probably the main reason I chose Purity was for the random blended images in the header. On and older version of Purity (funnily enough Purity I) all you had to do to personalise the header images was copy over the existing three and add as many additional ones as you desired. When I tried that with Purity II all I was getting was the first three images and only if I used the same names as the original images.
I tried everything I could think of and many things that I didn’t. I searched the internet for days before I found this obscure post…
…or more specifically this line…
background-image: url(<?php echo T3Path::getUrl(‘/images/header/header’. rand(1,3).’.jpg’); ?>);
…from the file “head.php”
That frustrating little line essentially says randomly insert into the header an image with the filename beginning with “header” then a random number between 1 and 3 and ending with “.jpg”.
All I had to do was change the 3 to a 6 and all six of my images began to appear. If I ever want to add more files I simply need to increment the number in the file.
So as I stated at the top of this post, this information is for me too.