category_view as club page

Morgain

Well-known member
I want to develop the category_view page - when you click a Category title and get a page of contents in that Category.
I think this page has a lot of potential.

The main issue is to create ALTERNATE category_view pages so the structure is the same but more components change according to which Category it is.

Here's a mockup of two different Category_View pages:

Category_view page DOUBLE.webp

Differences to code -

1. Page titles are different colours. This follows on Jake Bunce styling of the Category Title on the top level node tree.
1A. Background of the Title boxes are different colours. Same as Jake Bunce styling of the Category bar gradient on the top level node tree.
(the size, border and shadow of the title box is global and can be set in Style Groups already.)

2. Title graphic. Same as the Category icon on Jake Bunce's individualisedCategory bars. However this is set separately as it can be desirable to have a more detailed graphic, similar but richer, here. Or add a seasonal surprise!

3. Category Description taken from the Category bar on the node tree.

4. Title colour of the threads or subforum titles is same as the Page Title.

5. Moderator box to left to display Avatar and Username linked to Membercard) for these forums.

6. Section of page below the threads/ subforums for further content.


Most of this already exists with Jake's coding in EXTRA.css
just need to draw it on to this page.

The central issue to start is to tell this page to allow different content - colours, text, graphic, moderator display, depending on which category it is.

Look forward to my next lesson!
 
Jake thank you as always for speed and generosity.

I can now place an image at the top of the category page.
But it also shows the image inherited from PAGE_CONTAINER which I had already placed next to the title.
How can I tell category_view NOT to display the PAGE_CONTAINER title image?

Also I don't understand how to place the image.
I made a table like this:

Code:
<table width=100%><tr>
<td><!-- CATEGORY IMAGE -->
<xen:if is="{$category.node_id} == 41">
<img src="styles/default/page41-celtic.png" />
</xen:if>
</td>
<td><!-- TITLE -->
<xen:title>{$category.title}</xen:title>
</td>
</tr></table>

But the category image still shows up below the title on a different row, instead of on the same row on the left of the title.
 
For your purposes I think you want to get rid of xen:title, leaving only the category title. Replace this:

Code:
<xen:title>{$category.title}</xen:title>

With this:

Code:
{$category.title}
 
I can now place an image at the top of the category page.
But it also shows the image inherited from PAGE_CONTAINER which I had already placed next to the title.
How can I tell category_view NOT to display the PAGE_CONTAINER title image?

Add this code to category_view:

Code:
<xen:container var="$catImage">1</xen:container>

Then edit PAGE_CONTAINER and surround your image with this condition:

Code:
<xen:if is="!{$catImage}">

</xen:if>

That will hide the PAGE_CONTAINER image on category_view pages (when that xen:container line is included).
 
For your purposes I think you want to get rid of xen:title, leaving only the category title. Replace this:
Code:
<xen:title>{$category.title}</xen:title>

With this:
Code:
{$category.title}

It didn't like that!

Yes I do want to get rid of the xen title display. It would be easier to just build my own on a conditional for that page.
But isn't the xen title line necessary to identify the page?
 
xen:title passes information to the container. If you want to display the title in your template then just use {$category.title}.

The category_view template already contains a xen:title tag at the top. Leave that one there.
 
Top Bottom