Keyword

Can't select Template...

  • Nick
  • Nick's Avatar Topic Author
  • Offline
  • Elite Member
More
13 years 11 months ago #84111 by Nick
Can't select Template... was created by Nick
For some reason I can't select templates for my categories! It just says use default. I have several folders with templates in components/com_k2/templatesstrange? I think so!However, I'm trying to achieve something different really...take a look at my main page: www.animekyun.com. I basically want the category of the item to appear under the image.I did it with the following code: <?php if($this->item->params->get('itemCategory')): ?>        <div class="itemCategory">            <span><?php echo JText::_('More of this Anime in:'); ?></span>            <a href="/<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>        </div>        <?php endif; ?>However, this also appears in other parts of the website where it's not supposed to. I tried solving this with templates but that's a no go i guess..Is there a way to do a php if and then have it echo only when it's on the main page?

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

More
13 years 11 months ago #84112 by Ben Sims
Replied by Ben Sims on topic Can't select Template...
Hi,

You need to place your 'new' templates in /templates/YOUR SITE TEMPLATE FOLDER/html/com_k2/templates/xxx/

i.e. if you site template is 'rhuk_milkyway' and you want to add the template 'custom_news' you need to copy from:
/components/com_k2/templates/general/
to:
/templates/rhuk_milkyway/html/com_k2/templates/custom_news/

Hope this helps.

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


Powered by Kunena Forum