Hi Alex, hi all.
Is this the right and best way to reduce building detailed pages only when a var is set to Yes:
New field for table Links: Detailed, enum, Yes/No
In nph-build.cgi
my ($cond, $cond2, $cust_page, $cust_limit);
...
$cond ||= new GT::SQL::Condition;
$cond->add ('isValidated', '=', 'Yes');
$cond2 ||= new GT::SQL::Condition;
$cond2->add ('Detailed', '=', 'Yes');
This seems to run for me. But i would like to have more comfort:
I want to have a field Detailed for the table category ; if known that for all the links in this cat, there is no detailed wished.
Robert
Ok, here we go: Changes for the next and prev_url:
In Links/Build.pm
...
my $sth = $catlnk_db->select ( { CategoryID => $cat_id, isValidated => 'Yes', Detailed=> 'Yes' }, [ 'Links.ID' ] );
Is this the right and best way to reduce building detailed pages only when a var is set to Yes:
New field for table Links: Detailed, enum, Yes/No
In nph-build.cgi
Code:
sub _build_detailed { my ($cond, $cond2, $cust_page, $cust_limit);
...
$cond ||= new GT::SQL::Condition;
$cond->add ('isValidated', '=', 'Yes');
$cond2 ||= new GT::SQL::Condition;
$cond2->add ('Detailed', '=', 'Yes');
This seems to run for me. But i would like to have more comfort:
I want to have a field Detailed for the table category ; if known that for all the links in this cat, there is no detailed wished.
Robert
Ok, here we go: Changes for the next and prev_url:
In Links/Build.pm
Code:
sub build_detailed { ...
my $sth = $catlnk_db->select ( { CategoryID => $cat_id, isValidated => 'Yes', Detailed=> 'Yes' }, [ 'Links.ID' ] );