Keyword

Templating ?

  • viewon01
  • viewon01's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 weeks ago #81841 by viewon01
Templating ? was created by viewon01
Hi,
I have just start to play with K2... it is great... even if I have not yet discovered everything, but for now...

1) I use it in my home page, on the right you can see 'latest news', but it has a 'wrong' yellow background. Can you tell me how I can change this ?

2) When you click on 'blog' or 'news' it has not a 'blog style' by example it display 'big folder' on the top.
How can I change this... and by example display on the right a tree with all the categories ?

Thanks for the help 

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

  • viewon01
  • viewon01's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 weeks ago #81842 by viewon01
Replied by viewon01 on topic Templating ?
I have read this :

community.getk2.org/notes/Templating_in_K2

I have create several sub templates at : '/templates/polarlights01/html/com_k2'

/templates/polarlights01/html/com_k2/blog
/templates/polarlights01/html/com_k2/news
/templates/polarlights01/html/com_k2/latest_news

But,
1) In the menu manager, I have choose a menu item that reference a 'category', it doesn't allow me to choose a template ?
2) In the modules manager, when I choose a K2 content module, I only see the 'default' template

Can you tell me what is wrong ?

Thanks

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 3 weeks ago #81843 by Yiota
Replied by Yiota on topic Templating ?
1) If you want the items shown, when clicking to a menu item, to be from a single category then the template should be chosen inside the category's parameters and not inside the menu item. If you want items shown from multiple categories then you should be able to choose the template from the menu item.

2) The K2 content module has its own templates. You should add an override just like you did with the com_k2. It should be something like this html/mod_k2_content/TemplateName/default.php.

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

  • viewon01
  • viewon01's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 weeks ago #81844 by viewon01
Replied by viewon01 on topic Templating ?
Thanks for your help,

I have create the following folders :

/templates/polarlights01/html/mod_k2content/blog
/templates/polarlights01/html/mod_k2content/news
/templates/polarlights01/html/mod_k2content/latest_news

With the default.php page too... but I still have 'default' only ?

Thx

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 3 weeks ago #81845 by Yiota
Replied by Yiota on topic Templating ?
You need to copy them also inside the modules/mod_k2_content/tmpl/TemplateName/default.php for them to show on the backend list.

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

  • viewon01
  • viewon01's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 weeks ago #81846 by viewon01
Replied by viewon01 on topic Templating ?
Thanks,

I have it there :

/templates/polarlights01/html/mod_k2content/blog
/templates/polarlights01/html/mod_k2content/news
/templates/polarlights01/html/mod_k2content/latest_news

/modules/mod_k2_content/tmpl/polarlights01/blog
/modules/mod_k2_content/tmpl/polarlights01/news
/modules/mod_k2_content/tmpl/polarlights01/latest_news

But nothing appear !!! :-(

Are you sure that I need to copy several time the blog/default.php page ? in the following folders :
/templates/polarlights01/html/mod_k2content/blog
/modules/mod_k2_content/tmpl/polarlights01/

Sounds strange ?

Thanks for your help

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 3 weeks ago #81847 by Yiota
Replied by Yiota on topic Templating ?
No no, I'm sorry maybe I didn't express it clearly.
Inside the modules/mod_k2_content you should have:

/modules/mod_k2_content/tmpl/blog/default.php
/modules/mod_k2_content/tmpl/news/defualt.php
/modules/mod_k2_content/tmpl/latest_news/default.php

You don't have to copy the site's template name between.

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

  • viewon01
  • viewon01's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 weeks ago #81848 by viewon01
Replied by viewon01 on topic Templating ?
Thanks,

I have do this, but still nothing !!!

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 3 weeks ago #81849 by Yiota
Replied by Yiota on topic Templating ?
Let me recap the steps, just to be sure.

First you have to put inside templates/YourTemplate/html a new folder named mod_k2_content which will contain the Default folder with the default.php file as it is inside the modules/mod_k2_content/tmpl/. Then you make the three copies of the Default folder and you name them blog, news, latest_news.

After that you should go to the modules/mod_k2_content/tmpl and do the same with that Default folder.

As a result of these steps you should have inside the modules/mod_k2_content/tmpl 4 folders, Default, blog, news, latest_news and inside the templates/YourTemplate/html/mod_k2_content/ also 4 folders, Default, blog, news, latest_news.

Am I right so far?

Could you PM me access to your administration and install eXtplorer, if not installed already, or any other mean, so I can see the files also and locate the problem?

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


Powered by Kunena Forum