- Posts: 30
COMMUNITY FORUM
question about sub-template of K2 content module
- shenkwen
- Topic Author
- Offline
- Junior Member
Less
More
12 years 8 months ago #62005
by shenkwen
question about sub-template of K2 content module was created by shenkwen
Hi everyone,
I was trying to make a template of k2 content module for my front page. What I did is to copy /modules/mod_k2_content to/templates/mytemplate/html/mod_k2_content, and then under "tmpl" folder, I created a folder named "frontpage" and copied modified default.php into it. But, on module creating screen, in sub-template selection, there was only 1 option other than "use default", which is tmpl. So, I created a folder named "frontpage" at the same level as tmpl, this time, I can select "frontpage" template, only to found out it didn't work. After tried several different locations to upload default.php, I finally tried uploading it to the orignial place, which is /modules/mod_k2_content/tmpl/Default/, and select "tmpl" sub-template on module creating screen. This time, it worked. Please be noted I could still see the "frontpage" option there.
So as a conclusion, I think this could be a bug. Although I have copied those module files as instructed, the module wouldn't accept it and kept using the original files.
I was trying to make a template of k2 content module for my front page. What I did is to copy /modules/mod_k2_content to/templates/mytemplate/html/mod_k2_content, and then under "tmpl" folder, I created a folder named "frontpage" and copied modified default.php into it. But, on module creating screen, in sub-template selection, there was only 1 option other than "use default", which is tmpl. So, I created a folder named "frontpage" at the same level as tmpl, this time, I can select "frontpage" template, only to found out it didn't work. After tried several different locations to upload default.php, I finally tried uploading it to the orignial place, which is /modules/mod_k2_content/tmpl/Default/, and select "tmpl" sub-template on module creating screen. This time, it worked. Please be noted I could still see the "frontpage" option there.
So as a conclusion, I think this could be a bug. Although I have copied those module files as instructed, the module wouldn't accept it and kept using the original files.
Please Log in or Create an account to join the conversation.
- shenkwen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
12 years 8 months ago - 12 years 8 months ago #62006
by shenkwen
Replied by shenkwen on topic Re: question about sub-template of K2 content module
afterwards, I tried the following: I deleted all the files under html folder, now for sub-template there is only 1 option - Use Default. I created a "frontpage" folder in /modules/mod_k2_content, but there is still only Use Default option. Then I created a "front" folder in /modules/mod_k2_content/tmpl/, and copied default.php into it, this time I can choose sub-template as front and everything goes well.
So at least there is a problem where the "where to find sub-templet" rule is not consistent. In /modules/mod_k2_content/ the sub-template is to be found under tmpl folder, while in mytemplate/html/, the sub-template is to be found at the same level as tmpl folder and the module considers tmpl as a template.
So at least there is a problem where the "where to find sub-templet" rule is not consistent. In /modules/mod_k2_content/ the sub-template is to be found under tmpl folder, while in mytemplate/html/, the sub-template is to be found at the same level as tmpl folder and the module considers tmpl as a template.
Please Log in or Create an account to join the conversation.
- shenkwen
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 30
12 years 7 months ago #62007
by shenkwen
Replied by shenkwen on topic Re: question about sub-template of K2 content module
No one can answer this or I didn't descripe the issue clearly?
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 7 months ago #62008
by william white
Replied by william white on topic Re: question about sub-template of K2 content module
Try
Creating a directory yoursiteroot/templates/html/mod_k2_content
copy the dir siteroot/modules/mod_k2_content/tmpl/default to the newly created folder under html dir
make a copy of default called MyMODK2 in the same folder
Trick is to skip the tmpl folder
Creating a directory yoursiteroot/templates/html/mod_k2_content
copy the dir siteroot/modules/mod_k2_content/tmpl/default to the newly created folder under html dir
make a copy of default called MyMODK2 in the same folder
Trick is to skip the tmpl folder
Please Log in or Create an account to join the conversation.