Problems with category layout in Joomla 1.5.7

Rick Danger
Rick Danger used Ask the Experts™
on
I am using the CMS Joomla! (v. 1.5.7), and have just added a new category to a section on my website.

I have assigned it ‘article layout’ because I only want the one article to be published on this category, but I can’t get the article to behave as I wish. I want the article/category to appear in a yellow colour, like all the other articles and categories do in this section. However, it is appearing in blue.

Please can anyone tell me why this might be? I have looked everywhere and can’t fathom it. When I go to ‘view source’ I can see that the problem occurs straight after the <body> tag. The code is:

<div id="blue">
<div id="wrap">
<div id="inner">
  <div id="header">
    <div id="header_r">
<div id="logo"></div>

Please help if you can. Let me know if you need any more info.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What happens if you assign it to blog layout. With only one aritcle in the category only one article will be displayed. If you have not set the read more break, then the whole article will be displayed.

Commented:
In addition to exploring fearialtog's suggestion I would also check the menu settings you have for the display of this category as it may provide another source of different CSS.

If you use Firebug to check the displayed page it will allow you to identify where the divs/css are defined - and consequently where they need to be changed.

Author

Commented:
fearialtog: didn't make a difference I'm afraid.

austega: how would I go about changing the menu settings? And how does one get hold of firebug? Thanks.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Author

Commented:
Anyone able to help with this?

For some reason new categories seem to default to the div id "blue", which gives them a blue colour rather than behaving as other categories in the same section (e.g. appearing yellow as the one I'm working on should.

Using Firebug I can see that pages appearing correctly in this section have the div id tag "light", whereas the category in question has the div id tag "blue". Firebug draws attention to line 36 in the CSS, which reads:

body {
font-family:Helvetica,Arial,sans-serif;
font-size:76%;
line-height:1.3;
}

However, I can't see how this would make a difference. As far as I can gather, all new categories (regardless of the section they're in) default to div id tag "blue", but I can't see where in the CSS it says this should happen, or what to do about it.

Help very much required and appreciated!
Hi Rick,

If you post the url of the page I will take a look at it and see what I can do to help

Author

Commented:
Ok. Here's the problem page: http://www.directors.uk.com/index.php?option=com_content&view=article&id=616&Itemid=601

Here's what it should look like (in terms of colour rather than content, obviously): http://www.directors.uk.com/index.php?option=com_content&view=article&id=6&Itemid=12

Thanks.
Hi Rick,
&nbsp;The first page will not open probably because it has not been assigned to a menu or layout. No matter try this and see it it solves your problem.

Find the this line in the the following file
template.css (line 22)

#content {
float:left;
width:83%;
}

Add a background colour like this one just to see if it cures your problem

#content {
background-color:#FFFCCC;
float:left;
width:83%;
}

Note you can edit this file in Joomla from the template manager. Chose edit CSS


I should have mentioned also that the blue appears to becoming from your menu on the right hand side, picking up the style of a div called inside.

If my first suggestion did not work you can also try adding this to the end of your template.css file

.blog_news
{
background-color:#FFFCCC;
}

Note set it to the yellow colour you want. The above colour is there just to see if it makes a difference.

Author

Commented:
It's classed as "unwritable". Don't think I can make any changes, annoyingly...

Author

Commented:
Scrap that, yes I can. It gives every page a yellow background. Is that what you've intended?

Author

Commented:
Also, div.inside only affects the padding, as far as I can tell. The code is:

.inside {
padding:10px;
}

Author

Commented:
One last thing: the page should now open. I had it on Registered rather than Public, sorry.
This is probably one of the easiest solutions. Otherwise you will have to modify the html in blog layout component or implement a template override.

In module manager
Under Advanced Parameters
module suffix
add a suffix to your side menu module (it might be called main_menu)

just type in the word yellow
and add the following lines to your template.css file
.sidebar-yellow{
background-color:#FBB117;
}


As it stands now you have two clashing styles you can change the colour of one to match the other as a quick solution
template.css (line 208)
#blue #sidebar, #bluenews #sidebar {
background-color:#04AFE3;
}

template.css (line 216)
#light #sidebar {
background-color:#FBB117;
}

Author

Commented:
But won't that make changes to the colours of all pages? As it stands, pages under the Distribution section should have a yellow theme, whereas in Members all pages have a blue one (I can't show you, but take my word for it).

The changes you suggest would just make all sidebars yellow, wouldn't they?
Ah I see now you are trying to do. It is not impossible but it is hard to achieve. Joomla 1.6 is coming in the next few months and it will make what you are trying to achieve simple.

Here is an extract from a blog that explains it well
http://www.yireo.com/blog/general-news/273-cool-features-in-joomla-16

An example: Let's say you have a Joomla! template which offers a parameter to switch the overall color of the website (red, green and blue). Now, if you want to simulate various sections in your site, you might want section 1 to have a red color, section 2 to have a green color and section 3 to have a blue color. Because Joomla! 1.5 only allows you to assign a full template to certain pages, the only workaround is to make three copies of the same template.

Unfortunately this also means you have to maintain three sets of template, for instance when changing the site logo, you need to do that three times. Joomla! 1.6 solves this problem by using different Template Styles that make use of the same Joomla! template, but just with different parameters.

Author

Commented:
Sorry, perhaps I should've been more clear.

There are a number of different templates listed amongst 'template.css', including some called 'copy of template' and 'template -copy'. I didn't create the website, but do you think that's how different categories appear in different colours, depending on their section?

Unfortunately when I click 'Edit CSS' for any of these copies, I get this message:
JFile::read: Unable to open file: '/home/directorsukcom/public_html/templates/Directors_UK/css/template-Copy.css'
Hard to tell but I would say the author of the template used conditional contemplating and this could be the cause of your problems.

Some where in your code the following statement is changed from

<div class="blue" id="sidebar">
to
<div class="blue" id="sidebar" class="blue">
Search your template folder for the word -sidebar- and see if you can find the second statement above and make the changes you want.

As this appears to happen on the some condition is true. You will need tofind where this statement is made and change it. It may look something like the snippet attached.
Try looking at these files located in your template folder first.
html/com_content/category/
If you cannot find it in the template folder the some of the main core of Joomla has been edited.
I suggest the quickest solution is to ask the original writer of the template for advice.

<?php if(JRequest::getVar('view') == ('current_view') { ?>
    do something
<?php } else { ?>
     do something else
<?php } ?>

Open in new window

Author

Commented:
No, I can't find any glaring errors with the code. There's so much of it, and so many places to look!

The code is written like this (e.g):

#blue ul {
      padding: 15px 0 0 0;
}

rather than , so I couldn't find what you were referring to. I also couldn't find any php code dealing with "('view')", so all in all a bit of a disaster!

Thanks anyway.

I was not referring to any errors in the code but to customisations in the php files and not the css files. Clearly your site is working and your problem relates to the way someone else has customised your sites template. You have to understand php / html in order to customise it back to  the way you want it.




Author

Commented:
although not the complete solution, I am grateful for the help and time spent

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial