The Joomla! Forum ™

Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Feb 20, 2009 12:12 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sun Feb 25, 2007 10:44 pm
Posts: 511
Location: New Jersey, USA
J1.5.9 with Ja_Purity.
The objective was to change the background color of an article using the Page Class Suffix setting in the menu.
There is a well written tutorial for this technique at ... oomla!_1.5 , and it uses the Milky Way template. It works fine, but when trying to use it with ja_purity it doesn't work.

I found that JA Purity over-rides the html/com_content/article/default.php file to accomplish much of its look. I had to add a small snippet of code for each occurrence of a class=.
Everywhere you see a class declared with no pageclass_sfx call

Change by adding the call:
class="article-content<?php echo $this->params->get( 'pageclass_sfx' ); ?>"

Next, add your own custom CSS in template.css
Example: Providing yellow, green and blue backgrounds to articles.
#ja-content .yellowBack { background-color: #ffffbf; }
#ja-content .greenBack { background-color: #bfffbf; }
#ja-content .blueBack { background-color: #c8c8ff; }

The stated examples work on single articles accessed by menu tabs that have their Page Class Suffix set to
<space>yellowBack etc. per the tutorial.

A further note, this works on "articles" in a menu article layout. If you want to do it in a blog, frontpage or section layout, you will have to make similar changes to the respective html/com_content/xxx files.


Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 12 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group