Template trouble with catalogues module

Post

Posted
Rating:
#4872 (In Topic #982)
Joe
There are apparently two entry points to a catalogues' category index screen:

The first, has a URL parameter of type=category. This seems to be the main entry point Composr uses to link to the category's entry page. The template used to display the "outer banks" (or the content before & after the looped templates that show the categories) of this page is CATALOGUE_*_CATEGORY_SCREEN.

The second entry point has a URL parameter of type=index. This entry point is directed to from the AdminZone after editing an entry, catalogue, or category (this is the "View index" link on the do-next screen). Apart from the templates that actually loop to display the categories, there doesn't appear to be a main template used to display the outer banks of the page like described above.

The page rendering tool verifies this; it doesn't show CATALOGUE_*_CATEGORY_SCREEN as being used when the type parameter is set to index, and also the edits I made to my custom CATALOGUE_*_CATEGORY_SCREEN template only show on screens with type=category.

In conclusion, should the CATEGORY_SCREEN template apply to type=index screens? If not, what template can I modify to customize the "outer banks" of type=index screens?

Post

Posted
Rating:
#4873
Joe
For the record, both entry points seem to be almost the exact same – the only difference I can see without further investigation is type=category screens show actual entries as well as categories within that specific catalogue. type=index appears to only show the categories, not the entries.

However, I don't have any loose entries within that first category. But at least the type=category screen attempts to show them because I get a "there are no entries here" message.

Edit: type=index shows all categories, including subcategories, with no hierarchiological order. No entries are shown here.

Last edit: by Joe

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#4874
You're mixing up the root category with the index.

For the index PAGINATION_SCREEN wraps the categories. It is passed a _GUID parameter of 9ac6f5967177b020bebfe8b4ace35eff, which can be used with Tempcode to output content for only this instantiation of the template. Also a parameter, CATALOGUE, is passed – the codename of the catalogue.

Code

{+START,IF,{$EQ,{_GUID},9ac6f5967177b020bebfe8b4ace35eff}}
   {+START,IF_PASSED,CATALOGUE}
      {+START,IF,{$EQ,{CATALOGUE},example_catalogue}}
         <p>This is example_catalogue</p>
      {+END}
   {+END}
{+END}
1 guest and 0 members have recently viewed this.