forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: ninjapiraatti on May 05, 2010, 10:02:36 am

Title: Category page?
Post by: ninjapiraatti on May 05, 2010, 10:02:36 am

I'm trying to make a page that would have a list of all the categories - much like the landing page has. Problem is that I don't want the categories to display on the landing page and I don't want the category page to have anything else. http://www.aalto-photo.com (http://www.aalto-photo.com)
Title: Re: Category page?
Post by: Αndré on May 05, 2010, 11:01:48 am
Code: (cat.php) [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');

$result cpg_db_query("SELECT name FROM {$CONFIG['TABLE_CATEGORIES']}");
while (
$row mysql_fetch_assoc($result)) {
    echo 
$row['name'].'<br />';
}
?>
Title: Re: Category page?
Post by: ninjapiraatti on May 05, 2010, 11:07:12 am
That gives me a list of categories on a blank white page without CSS. What I'm after is a page that would work like any other but would include only categories.
Title: Re: Category page?
Post by: Αndré on May 05, 2010, 11:16:56 am
What I'm after is a page that would work like any other
Please elaborate. You asked for a list of all categories, you got a list of all categories. If you want to include the Coppermine design, add pageheader() and pagefooter() to the file. I'm still not sure what exactly you want to accomplish.
Title: Re: Category page?
Post by: ninjapiraatti on May 05, 2010, 11:39:24 am
Ok, I'll try to explain in more detail. What I want is a page that is exactly like the main page with anycontent, top rated, last additions etc. removed. In other words, main page with nothing but fully functional category list.
Title: Re: Category page?
Post by: Joe Carver on May 05, 2010, 12:20:27 pm
You could try this plugin     
Category List Page Layout Change (Album list link) (http://forum.coppermine-gallery.net/index.php/topic,64270.0.htm). There are restrictions - your installation must be at svn 7361 or higher.
Title: Re: Category page?
Post by: ninjapiraatti on May 05, 2010, 12:26:42 pm
Thanks! I'll give it a shot.