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: 509
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 http://docs.joomla.org/Tutorial:Using_C ... 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=.
Example:
Everywhere you see a class declared with no pageclass_sfx call
Code:
class="article-content"

Change by adding the call:
Code:
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.

Phil


Top
 Profile  
 
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 28 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