Different <body id=""> for each category Different <body id=""> for each category
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Different <body id=""> for each category

Started by muzick, April 15, 2008, 03:08:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

muzick

I am trying to fit CPG into the look and feel of my site, and I want to use it for two different sections.  I have already built my website based around different IDs applied to the <body> tag, and I want to be able to use the category name and description as part of the header in addition to in the actual gallery itself.  I tried putting this into my template.html, but it didn't work:


<body id="{CAT_TITLE}">
... some other code here ...
<h2 class="catTitle">{CAT_DESC}</h2>
<div id="content">
    {GALLERY}
</div>


The {GALLERY} works fine as per normal, but the CAT_TITLE and CAT_DESC aren't retrieving the appropriate values.  What do I need to do in order to get this to work?

Thanks in advance.

muzick

*bump*

Is there any way to access some of these variables directly form my template.html file?  I have also realized that I want to move the "Powered By:" link to the footer of my page, but it is generated along with everything else in the {GALLERY} bit.

I want to use coppermine for my photo gallery, but if it is not possible to integrate it into my layout, I'll have to try and find something else.  I am hoping it's possible, though, as I like the options CPG offers.

Nibbler

Pretty sure you can't do that. The pageheader is finished before the code that gets the category details even runs. Category titles are unlikely to be valid ids anyway.

muzick

So there's no way to have a different page theme for different categories, then?