Keyword

K2 Item Templates

  • Barry Palmer
  • Barry Palmer's Avatar Topic Author
  • Offline
  • New Member
More
10 years 11 months ago - 10 years 11 months ago #119377 by Barry Palmer
K2 Item Templates was created by Barry Palmer
Running Joomla 2.5.14 & K2 2.6.7
Created K2 Template by copying default to mytemplate/html/com_k2, duplicating & modifying itemform.php
Selected this new template in ONE of my K2 categories
When I create a new Item in this category I expected to be given my NEW itemform template, but NO I get the default!
Same if I try to EDIT an item in this category!

Created a new front-end menu item -> edit K2 item
Specified default category for this menu to be my 'special' category with the new template
THIS WORKS!
BUT, if (in the front-end) I try to EDIT this item I'm given the default template again!

I need a special customised itemform for this category - from & backend

How?
Please?

Xtra info on this:
From Front-end, log in as Admin, view Category1 (the one with customised template) item & click on EDIT ITEM
The template used is NOT templates/my template/html/com_k2/customised_template/itemform.php
BUT
templates/my template/html/com_k2/default/itemform.php

EVEN though I have specified that the template for this category is 'customised_template'

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119378 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Item Templates
Itemform.php will be rendered from the default template unless specified from your menu item's settings.

One way to have multiple itemform templates is to have a GET parameter on your K2 module link (possibly the current menu item) and depending on that paramemeter display the appropriate template.

It is not too hackish and if you implement this on your overrides you won't face any issues.

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

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


Powered by Kunena Forum