COMMUNITY FORUM
Template help - files
- Aaron
-
Topic Author
- Offline
- Premium Member
Can anyone help me fill in the blanks?
category.php
- this is the file that is shown when you click on a category and the items are displayed
- link: maincategory/category
item.php
- this is the file that is shown when you click on an item title
- link: maincategory/item/itemname
???
category_item.php
category_item_links.php
item_comments_form.php
itemform.php
latest.php
latest_item.php
tag.php
user.php
Aaron :)
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
search category.php line 153 category_item.php is called
search item.php
line 581 loads item_comments
Please Log in or Create an account to join the conversation.
- Joom_Lee
-
- Offline
- New Member
- Posts: 11
Aaron wrote: (...)
category.php
- this is the file that is shown when you click on a category and the items are displayed
- link: maincategory/category
item.php
- this is the file that is shown when you click on an item title
- link: maincategory/item/itemname
???
category_item.php
category_item_links.php
item_comments_form.php
itemform.php
latest.php
latest_item.php
tag.php
user.php
here is what I remember.
category.php is called when you click on a category. Within category.php -->
category_item.php: is included taking care of items' layout in category_view
category_item_links.php: same here but for links.
item_comments_form.php
is for the comment field called in item.php
and so on as far as I remember from the last custom layout ... do not have the time to check all references but names are mostly self-explaining. If I remember correctly category is the most confusing since it calls two sub files and it takes time to understand where the <divs> come from. ;)
Please Log in or Create an account to join the conversation.
- Aaron
-
Topic Author
- Offline
- Premium Member
My problem was not taking into consideration the fact that one file might call another. I was, for some reason, expecting individual calls from K2 directly to a file which does not appear to the be case.
Seeing that I edit a file and the changes show up on different pages, let me see if we can break it down that way...
So, when I edit...
category_item.php I see changes:
- when I click on a category and the items are listed as per the category settings
- link: maincategory/category
When I edit:
item.php I see changes:
- when I click on any item
from what William and Joom_Lee state below:
There are files called from other files but what I don't understand is why, when I change those files, the changes do not show up anywhere?
for instance, if category.php is called when I click on a category, changing that file should change what the page looks like right? But, I am finding that is not what is happening. I have put comments in there that are not present when I go to each page which I think is calling the file.
I will have to work with it a little more but it seems that some of the files may change portions of other files - for instance, item_comments_form.php may change how the comments form in item.php appears.
I'll do more research though as I am still confused to the dependencies and full relationships of the files.
Thanks for the help!! :D
Aaron :)
Please Log in or Create an account to join the conversation.
- Joom_Lee
-
- Offline
- New Member
- Posts: 11
Aaron wrote: (...)
from what William and Joom_Lee state below:
There are files called from other files but what I don't understand is why, when I change those files, the changes do not show up anywhere?
for instance, if category.php is called when I click on a category, changing that file should change what the page looks like right? But, I am finding that is not what is happening. I have put comments in there that are not present when I go to each page which I think is calling the file.
You mean you want to show comments in a category but they are not displayed although you copied the code in category.php from item.php?
My quick guess is that the category does not have the defined variable comments while the item model passing it to the view does. As result you should have the empty divs for comments but no comment content in the category view.
Check if this is the case to confirm the hypothesis. If so (this is similar to the multicategory issue topic) you need to modify the php calling the comments.
Please Log in or Create an account to join the conversation.