Keyword

K2 Templating and css

More
14 years 3 months ago #76899 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
@Troponin

I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used.

that's why, in the main category view, the k2 generic template is used without a specific one loaded.

When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.

@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

More
14 years 3 months ago #76900 by Simon Wells
Replied by Simon Wells on topic K2 Templating and css
Hi Olivier,
The demo i have at k2joom, is set up as follows.
Main Category (K2Joom Dev), No Theme. No Inherit
Sub Category (K2 Theming), No Theme. No Inherit
Sub Sub Category 1 (CSS Style 1 Category (1) ), Theme 1. No Inherit (this is a css modified and renamed copy of the standard k2_style.css)
Sub Sub Category 2 (CSS Style 2 Category (1) ), Theme 2. No Inherit (this is a renamed copy of the standard k2_style.css)

I have 1 item in each of the Sub Sub Cats
When the items are displayed in Sub Category, 2 leading, 2 columns, they both look the same, this I expect as no theme is set for this sub category and, it figures it can not mix between the themes selected in the sub sub cat.

When item 1 is seen in its parent category, Sub Sub Category 1 it looks the same as item 2 in its parent category Sub Sub Category 2. In my opinion, these should look different as Sub Sub Category 1 is using a modified css file.

The difference is only seen when looking at the items in full.

I am still looking at overrides, but a lot seem to related to the Joomla template and not K2 template, such as H1, H2.

Olivier Nolbert said:@Troponin I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used.
that's why, in the main category view, the k2 generic template is used without a specific one loaded.

When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.

@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

More
14 years 3 months ago #76901 by Simon Wells
Replied by Simon Wells on topic K2 Templating and css
To confirm this point a bit more, I am creating a new downloads area.

I created a Downloads Category and 4 Sub Categories all of these categories are using a new K2download_style.css which resides inside templates/ja_purity_ii/html/com_k2/templates/K2download

I wanted the sub categories to appear similar to the parent category.

The category image looks like:
div.itemListCategory img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}

The Sub Cat image had no style:
div.subCategory a.subCategoryImage img {}

so i copied the style content in to the sub cat but it does apply it
I made a change to the category.php that is inside this theme i using, to check and see that it is being called up.
I added and this is dispalyed in the sub cat list in the category so I know that the files for the theme is working, but just not looking at the css.

UPDATE: I just added:
div.subCategory a.subCategoryImage img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}
to components/com_k2/css/style.css, result, no change.
to /components/com_k2/css/k2.css, then sub cat image layout changes.

Any ideas?

Simon Wells said:Hi Olivier, The demo i have at k2joom, is set up as follows. Main Category (K2Joom Dev), No Theme. No Inherit
Sub Category (K2 Theming), No Theme. No Inherit
Sub Sub Category 1 (CSS Style 1 Category (1) ), Theme 1. No Inherit (this is a css modified and renamed copy of the standard k2_style.css)
Sub Sub Category 2 (CSS Style 2 Category (1) ), Theme 2. No Inherit (this is a renamed copy of the standard k2_style.css)

I have 1 item in each of the Sub Sub Cats
When the items are displayed in Sub Category, 2 leading, 2 columns, they both look the same, this I expect as no theme is set for this sub category and, it figures it can not mix between the themes selected in the sub sub cat.

When item 1 is seen in its parent category, Sub Sub Category 1 it looks the same as item 2 in its parent category Sub Sub Category 2. In my opinion, these should look different as Sub Sub Category 1 is using a modified css file.

The difference is only seen when looking at the items in full.

I am still looking at overrides, but a lot seem to related to the Joomla template and not K2 template, such as H1, H2.

Olivier Nolbert said:@Troponin I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used. that's why, in the main category view, the k2 generic template is used without a specific one loaded.
When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.

@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

More
14 years 3 months ago #76902 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
Hi Simon,

I check that and make a feedback.

Olivier

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

  • troponin
  • troponin's Avatar Topic Author
  • Offline
  • Platinum Member
More
14 years 3 months ago #76903 by troponin
Replied by troponin on topic K2 Templating and css
Simon Wells said:To confirm this point a bit more, ... UPDATE: I just added:
div.subCategory a.subCategoryImage img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}
to components/com_k2/css/style.css, result, no change.
to /components/com_k2/css/k2.css, then sub cat image layout changes.

Any ideas?



Correct me if i'm wrong:

I thought the custom should be placed in %Joomlatemplate%/html/com_k2/templates/%k2template%/%k2template%_style.css

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

More
14 years 3 months ago #76904 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
@Troponin : You're right, the specific css must be placed in 'templates/JOOMLATEMPLATE/html/com_k2/templates/K2TEMPLATE/' and must be called 'K2TEMPLATE_style.css' where :

JOOMLATEMPLATE is the folder of the joomla template used
K2TEMPLATE is the folder of the k2 sub-template used by the category.

Olivier

Troponin said:Simon Wells said:To confirm this point a bit more, ... UPDATE: I just added: div.subCategory a.subCategoryImage img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}
to components/com_k2/css/style.css, result, no change.
to /components/com_k2/css/k2.css, then sub cat image layout changes.

Any ideas?



Correct me if i'm wrong:

I thought the custom should be placed in %Joomlatemplate%/html/com_k2/templates/%k2template%/%k2template%_style.css

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

More
14 years 3 months ago #76905 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
Hi Simon,

The items look the same in their category view because the css in the 2 css sub-template css files are the same (at least for the article title element : div.catItemHeader h3.catItemTitle)

If you check the head of the document in each category view, you'll see that k2.css file is loaded and after it, the k2 sub-template css file, so it should work.

Olivier

Simon Wells said:Hi Olivier, The demo i have at k2joom, is set up as follows.
Main Category (K2Joom Dev), No Theme. No Inherit
Sub Category (K2 Theming), No Theme. No Inherit
Sub Sub Category 1 (CSS Style 1 Category (1) ), Theme 1. No Inherit (this is a css modified and renamed copy of the standard k2_style.css)
Sub Sub Category 2 (CSS Style 2 Category (1) ), Theme 2. No Inherit (this is a renamed copy of the standard k2_style.css)

I have 1 item in each of the Sub Sub Cats
When the items are displayed in Sub Category, 2 leading, 2 columns, they both look the same, this I expect as no theme is set for this sub category and, it figures it can not mix between the themes selected in the sub sub cat.

When item 1 is seen in its parent category, Sub Sub Category 1 it looks the same as item 2 in its parent category Sub Sub Category 2. In my opinion, these should look different as Sub Sub Category 1 is using a modified css file.

The difference is only seen when looking at the items in full.

I am still looking at overrides, but a lot seem to related to the Joomla template and not K2 template, such as H1, H2.

Olivier Nolbert said:@Troponin I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used. that's why, in the main category view, the k2 generic template is used without a specific one loaded.

When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.

@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

More
14 years 3 months ago #76906 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
Simon,

Do you have a link for these categories i can check ?

Olivier

Simon Wells said:To confirm this point a bit more, I am creating a new downloads area.
I created a Downloads Category and 4 Sub Categories all of these categories are using a new K2download_style.css which resides inside templates/ja_purity_ii/html/com_k2/templates/K2download

I wanted the sub categories to appear similar to the parent category.

The category image looks like:
div.itemListCategory img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}

The Sub Cat image had no style:
div.subCategory a.subCategoryImage img {}

so i copied the style content in to the sub cat but it does apply it
I made a change to the category.php that is inside this theme i using, to check and see that it is being called up.
I added and this is dispalyed in the sub cat list in the category so I know that the files for the theme is working, but just not looking at the css.

UPDATE: I just added:
div.subCategory a.subCategoryImage img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}
to components/com_k2/css/style.css, result, no change.
to /components/com_k2/css/k2.css, then sub cat image layout changes.

Any ideas?

Simon Wells said:Hi Olivier, The demo i have at k2joom, is set up as follows. Main Category (K2Joom Dev), No Theme. No Inherit Sub Category (K2 Theming), No Theme. No Inherit
Sub Sub Category 1 (CSS Style 1 Category (1) ), Theme 1. No Inherit (this is a css modified and renamed copy of the standard k2_style.css)
Sub Sub Category 2 (CSS Style 2 Category (1) ), Theme 2. No Inherit (this is a renamed copy of the standard k2_style.css)

I have 1 item in each of the Sub Sub Cats
When the items are displayed in Sub Category, 2 leading, 2 columns, they both look the same, this I expect as no theme is set for this sub category and, it figures it can not mix between the themes selected in the sub sub cat.

When item 1 is seen in its parent category, Sub Sub Category 1 it looks the same as item 2 in its parent category Sub Sub Category 2. In my opinion, these should look different as Sub Sub Category 1 is using a modified css file.

The difference is only seen when looking at the items in full.

I am still looking at overrides, but a lot seem to related to the Joomla template and not K2 template, such as H1, H2.

Olivier Nolbert said:@Troponin I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used. that's why, in the main category view, the k2 generic template is used without a specific one loaded. When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.

@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

  • troponin
  • troponin's Avatar Topic Author
  • Offline
  • Platinum Member
More
14 years 3 months ago #76907 by troponin
Replied by troponin on topic K2 Templating and css
Category Tutorials under Templatename "standard" - k2.css is loaded (standard_style.css should ?)
Item View in the Tutorials Categoy - standard_style.css is loaded (works)
Subcat Showcase under Templatename "modify" - k2.css is loaded (modify_style.css should ?)
Item in subcat "Showcase" - modify_style.css is loaded (also the template files -> you see there is no text (deleted in template modify))


Olivier Nolbert said:Simon,
Do you have a link for these categories i can check ?

Olivier

Simon Wells said:To confirm this point a bit more, I am creating a new downloads area. I created a Downloads Category and 4 Sub Categories all of these categories are using a new K2download_style.css which resides inside templates/ja_purity_ii/html/com_k2/templates/K2download

I wanted the sub categories to appear similar to the parent category.

The category image looks like:
div.itemListCategory img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}

The Sub Cat image had no style:
div.subCategory a.subCategoryImage img {}

so i copied the style content in to the sub cat but it does apply it
I made a change to the category.php that is inside this theme i using, to check and see that it is being called up.
I added and this is dispalyed in the sub cat list in the category so I know that the files for the theme is working, but just not looking at the css.

UPDATE: I just added:
div.subCategory a.subCategoryImage img {float:left;display:block;background:#fff;padding:4px;border:1px solid #ddd;margin:0 8px 0 0;}
to components/com_k2/css/style.css, result, no change.
to /components/com_k2/css/k2.css, then sub cat image layout changes.

Any ideas?

Simon Wells said:Hi Olivier, The demo i have at k2joom, is set up as follows. Main Category (K2Joom Dev), No Theme. No Inherit Sub Category (K2 Theming), No Theme. No Inherit Sub Sub Category 1 (CSS Style 1 Category (1) ), Theme 1. No Inherit (this is a css modified and renamed copy of the standard k2_style.css)
Sub Sub Category 2 (CSS Style 2 Category (1) ), Theme 2. No Inherit (this is a renamed copy of the standard k2_style.css)

I have 1 item in each of the Sub Sub Cats
When the items are displayed in Sub Category, 2 leading, 2 columns, they both look the same, this I expect as no theme is set for this sub category and, it figures it can not mix between the themes selected in the sub sub cat.

When item 1 is seen in its parent category, Sub Sub Category 1 it looks the same as item 2 in its parent category Sub Sub Category 2. In my opinion, these should look different as Sub Sub Category 1 is using a modified css file.

The difference is only seen when looking at the items in full.

I am still looking at overrides, but a lot seem to related to the Joomla template and not K2 template, such as H1, H2.

Olivier Nolbert said:@Troponin I wrote you an email too. When You're in the main category view (view=itemlist&layout=category), you can have subcategories displayed and many featured items from different categories. Without testing, all the css files from all the categories and items k2 subtemplates would be loaded and the last one would be used. that's why, in the main category view, the k2 generic template is used without a specific one loaded. When you're in a sub-category (view=itemlist) with a template affected, the job is done for the category and for the items.
@simon

Could you telle me which elements need to be over ridden ?

Thx for the review on k2joom.com

Olivier

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

More
14 years 3 months ago #76908 by Jiliko.net
Replied by Jiliko.net on topic K2 Templating and css
@troponin

could you send me the real joomla link for the category tutorials page (not the sef one) ?

The last 2 links return a 403 error

Olivier

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


Powered by Kunena Forum