Build_Detail once

I love the idea to build the detailed pages just in the directory where they belong. So i have changed the dir to %Path% / %ID% (Path is a new field for Category); this would be perfect as long i would have all links only in one cat.

But i have some more dimensions to save my links. Now i have added another field "detail" to Category with {0|1}

Not 100% sure what you want to do, but as far as I see you have to look a couple of lines further. CatLinks and Category is included as you said but as well:

Code:

$rel->select_options("GROUP BY LinkID") if $CFG->{build_detail_format} eq '%ID%'; $rel->select_options("ORDER BY LinkID");

The loop you are looking at is not the loop doing the queries:

Code:

my $sth = $rel->select('Links.*', @cat_cols, 'CategoryID' => $cond);

Is probably your problem. I work with dynamic pages, but at first sight I would say detailed pages are built for every Category which means you can not influence their location as easy as you might wish.

my $Links = $DB->table('Links'); while () { # Links can be in multiple categories, make sure their detailed pages are only built once # $rel->select_options("GROUP BY LinkID") if $CFG->{build_detail_format} eq '%ID%'; # build detailed in %Path%/%ID% $rel->select_options("GROUP BY LinkID"); $rel->select_options("ORDER BY LinkID");

Gossamer Threads is a Vancouver-based company with over 22
years experience in web technology. From development to hosting, we
partner with leading organizations around the globe and help to build
their web presences, strategies and infrastructures.