Keyword

sub-templates for K2Content module

More
13 years 11 months ago #71272 by jamesrward
Replied by jamesrward on topic sub-templates for K2Content module
I took a sub-template I had already setup in:
/modules/mod_k2_content/tmpl/[mymoduletemplatename]/

and moved it to:

/templates/MY ACTIVE JOOMLA TEMPLATE/html/mod_k2_content/[mymoduletemplatename]/

I clear the cache and edit my module and the sub-template disappears from the Select sub-template drop-down.

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

More
13 years 11 months ago #71273 by jamesrward
Replied by jamesrward on topic sub-templates for K2Content module
A quick look at the xml file for the module shows this line:

param name="getTemplate" type="folderlist" default="Default" label="Select sub-template" directory="/modules/mod_k2_content/tmpl" hide_default="1" hide_none="1" description=""

With the directory set as /modules/mod_k2content/tmpl

And in the php it looks like it just takes that variable directly. I don't see any if statements looking for templates in other directories.

Maybe 2.3 changes this.

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

More
13 years 11 months ago #71274 by Oceanwatcher
Replied by Oceanwatcher on topic sub-templates for K2Content module
You are absolutely correct! I checked it and it is only working correct in v. 2.3!

Sorry, was thinking about the general com_k2 template override while talking about the module templateoverride.

I stand corrected :-)

The functionality in v. 2.3 is how it SHOULD work and in general is how all extensions in Joomla should work. I am not sure how it will be handled from Joomla v. 1.6 as that one will have automatic upgrades (yay!). It will put more stress on developers and sitebuilders to use overrides and extensions instead of editing core files.

And last, but not least - backup, backup, backup .... eh... backup!

Thank you for correcting this.


James Ward said:A quick look at the xml file for the module shows this line:
param name="getTemplate" type="folderlist" default="Default" label="Select sub-template" directory="/modules/mod_k2_content/tmpl" hide_default="1" hide_none="1" description=""

With the directory set as /modules/mod_k2content/tmpl

And in the php it looks like it just takes that variable directly. I don't see any if statements looking for templates in other directories.

Maybe 2.3 changes this.

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


Powered by Kunena Forum