Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Conditional build for detailed pages?

Quote Reply
Conditional build for detailed pages?
We are expecting editors to be adding original content in new Links table columns. The added content could be substantial, but will probably happen in no more than 10% of the Links records.

We would like to display it in the detailed pages, but we don't want to build a very large number of detailed pages with no extra information -- it's a waste of CPU time, which is getting difficult already.

We have added a Boolean column isContent to the Links table to determine whether a link to the detailed should be visible. But I cannot figure out how to use it to control building detailed, ie: something like this ...
Code:
<%if isContent%> build_detailed_for_this_link_ID <%endif %>

Build.pm seems to be the module ... but I don't yet know enough about Links SQL internals to understand program logic and flow. It's very simple in flatfile Links -- but here, I just can't see it.

GT People?
Quote Reply
Re: [YoYoYoYo] Conditional build for detailed pages? In reply to
Answering my own question ... it is very easy to do this.
I was looking in the wrong place.

This works ... in nph-build.cgi, sub _build_detailed, find
Code:
$cond->add ('isValidated', '=', 'Yes');
at line 503.

Then below it, insert
Code:
$cond->add ('isContent', '=', 'Yes');