Keyword

Templating issues

  • Olaf Veerman
  • Olaf Veerman's Avatar Topic Author
  • Offline
  • New Member
More
14 years 10 months ago #68212 by Olaf Veerman
Templating issues was created by Olaf Veerman
I'm trying to get into the new templating system of K2 and have some questions:

- according to a post from Fotis (forum.joomlaworks.gr/index.php?topic=8516.0), it should be enough to copy the contents of components/com_k2/templates/default to templates/*yourtemplate*/html/com_k2/*customtemplate* to be able to assign a custom template to a category.
This did not work for me however. The template did not show up in the dropdown of the category parameters.
I am doing some testing now by having the folder of my custom template in the components/com_k2... folder instead of my template folder.
Anybody run into the same, or am I missing something?

- the changes I made to the item.php show up without a problem. However, the category overview stays the same, no matter how I change category.php and category_item.php
Anybody run into this?

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

  • Olaf Veerman
  • Olaf Veerman's Avatar Topic Author
  • Offline
  • New Member
More
14 years 10 months ago #68213 by Olaf Veerman
Replied by Olaf Veerman on topic Templating issues
The second issue is solved. The category view was accessed by a Menu Item. I had not realized that the template had to be set at Menu Level and not at the Category View.

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

More
14 years 10 months ago #68214 by Oceanwatcher
Replied by Oceanwatcher on topic Templating issues
It did not work for me to do the template override thing. Will investigate that later. Here is what I did:

In /components/com_k2/templates

I duplicated the default folder and named it something else. This name immediately came up in the drop-down menu for templates in the category settings.

I have been changing the template for full article display a little bit and also doing some changes to the styles.css. I do not know what file that controls the display of items on the front page. That is my next thing to change.

Another thing that is a problem for me is that some things in the k2 template picks up some styling from the main template. Most of it is ok, but there is a top margin over a heading that I would love to get rid of...

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

More
14 years 10 months ago #68215 by Oceanwatcher
Replied by Oceanwatcher on topic Templating issues
Here is the clue to get to the frontpage! It suddenly dawned on me and I think this add to my impression that there are some things that have not been thought through totally yet. BUT - it is solveable :-)

The file that controls the frontpage is category_item.php - BUT - even if you have set the categories to use the new template, it will not work. You have to go to the menu item to choose the template there as well. So it seems some things on the front page is decided by the parameters in the menu item, and some are decided by the category parameters.

Any way - my changes to the template is now showing up on the frontpage, so I will go on with my fixing :-)

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

More
14 years 10 months ago #68216 by Oceanwatcher
Replied by Oceanwatcher on topic Templating issues
Sorry, did not see this post until I posted my second post! Must say I am not too impressed by this forum system. Very confusing layout and threading. Wish they would do something about it...

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

More
14 years 9 months ago #68217 by Erebrum
Replied by Erebrum on topic Templating issues
Ok about template placing, here is link to post for what i found so far (didnt yet changed templates but templates are showing when placed in custom template HTML folder...)

Link here (posting to avoid post duplication)

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

More
14 years 8 months ago #68218 by Johan Cyprich
Replied by Johan Cyprich on topic Templating issues
Olaf said:The second issue is solved. The category view was accessed by a Menu Item. I had not realized that the template had to be set at Menu Level and not at the Category View.


I'm having the same problem. I put a new template in this folder: templates/rt_merdian_j15/html/com_k2/blog and it doesn't appear in the template selection list when editing a category. Although, the template does appear when its in components/com_k2/templates/blog. Is is better to put a custom template in the K2 component folder or the Joomla template folder?

Thanks.

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

More
14 years 8 months ago #68219 by juro
Replied by juro on topic Templating issues
Yep, exactly the same on my side. Two different servers, two different sites, same behaviour.

First I thought it was a problem with the JYAML component, so I tried it on my development box with a fresh install and the ja_purity template - it didn't work.

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

More
14 years 8 months ago #68220 by Johan Cyprich
Replied by Johan Cyprich on topic Templating issues
Johan Cyprich said:Olaf said:The second issue is solved. The category view was accessed by a Menu Item. I had not realized that the template had to be set at Menu Level and not at the Category View.


I'm having the same problem. I put a new template in this folder: templates/rt_merdian_j15/html/com_k2/blog and it doesn't appear in the template selection list when editing a category. Although, the template does appear when its in components/com_k2/templates/blog. Is is better to put a custom template in the K2 component folder or the Joomla template folder?

Thanks.


I fixed this template selection problem. I forgot to add a templates folder in the Joomla template. The correct folder structure is: templates/rt_merdian_j15/html/com_k2/blog/templates/. Now I have to customize the template for a blog theme.

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

More
14 years 7 months ago #68221 by GL2
Replied by GL2 on topic Templating issues
To clarify the last post, the custom template folder location for K2 should be:

/templates/yourtemplate/html/com_k2/templates/...

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


Powered by Kunena Forum