Template trouble with catalogues module
Posted
#5212
(In Topic #1177)

Standard member

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?
Posted

Standard member

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
Posted

Site director

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}
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.