Keyword

Problems getting another sub template to work

  • Peter Mathews
  • Peter Mathews's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111555 by Peter Mathews
Problems getting another sub template to work was created by Peter Mathews
Joomla 2.5.9 - K2 2.6.5

I have successfully got a sub template to work on categories on my K2 website.

So I have added another one the same way. This appears in the "select a template" drop down in the edit category view as expected.

But where the original sub template works perfectly and picks up the custom css from within my template folder, this new sub template doesn't.

I have checked that the name of the css file within the sub template folder is correct.

Is there anything that I am missing?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111556 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Problems getting another sub template to work
Hello Peter,

Do you have your menus properly set up?
Where are you loading your files from? Are you using conditional loading depending on the category you are currently viewing? In that case double check your menus.

In any other cases you should use addStyleSheet() command in your template files to load your stylesheet.

Regards.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Peter Mathews
  • Peter Mathews's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111557 by Peter Mathews
Replied by Peter Mathews on topic Re: Problems getting another sub template to work
Hi Krikor

My menu system just calls a K2 item.
For instance my Home button calls the "welcome" K2 item. This item is in a category which I have set to use this new sub template, as I want to adjust some positioning of headers and images.

As this is going to be the default layout for most pages, am I approaching this the wrong way?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 6 months ago #111558 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Problems getting another sub template to work
Not really,

We are always talking about a K2 subtemplate not a Joomla! subtamplate, right?

In your position I would mal the entire content in menus, use only one stylesheet and use a body class to show me the current item ID I am browsing.

From this point on it's just simple CSS, use a suffix like .itemID-xxx and override the classes you want.

This is more versatile and way better for SEO.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Peter Mathews
  • Peter Mathews's Avatar Topic Author
  • Offline
  • New Member
More
11 years 6 months ago #111559 by Peter Mathews
Replied by Peter Mathews on topic Re: Problems getting another sub template to work
Hi

I am using k2 sub templates.
Here is the site development - fardesign.co/golfclub/

All pages are K2 items.
I have used an override for the opens and diary pages, so I can position the extra fields on the page.
This override works as I expected. I associated the sub template I called "events" to the category(s) which contains the events_style.css. This is all fine.

What I thought I could do is to set up another sub template and apply it to a general category which contains alot of the website pages, to allow me to, for example, move everything up on the other pages so the title line is in line with the elements in the left hand column

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum