Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

How to build pages only when a specific condition is meet?

Quote Reply
How to build pages only when a specific condition is meet?
Currently there are only 3 options to build pages, Build Changed, Build All and Build Staggered.

Is there any way to build only pages where specific condition is meet, like Father_id ="77" or custom_field="fruits" ?

We have rather large and fairly independent sections in our database and would like to build only some sections when they are changed instead of building entire site. Is this possible?

Thank you.
Quote Reply
Re: [AMIXIMA] How to build pages only when a specific condition is meet? In reply to
Find in nph-build.cgi the sub _build_detailed

There i have something like:
print "Building Detailed pages...\n";

# Only build validated links
$cond ||= GT::SQL::Condition->new;
$cond->add(VIEWABLE);
$cond->add(Detailed=> '=' => 'Yes');

I have changed this code some years before, so i dont remember everything i have done, but maybe this hint is enough for you.

Last edited by:

Robert: Mar 13, 2014, 11:18 AM
Quote Reply
Re: [AMIXIMA] How to build pages only when a specific condition is meet? In reply to
Hi,

To use a plugin should be better, particularly when glinks is upgraded, your changes will not lost.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [AMIXIMA] How to build pages only when a specific condition is meet? In reply to
As Tandat said, you would be better with a plugin. I've done it before on a much more custom site, but I ended up re-writing the whole build script (as it did a ton of stuff we didnt need, and also I wanted to implement multiple language into the build).

However, doing a simple ID => xxxx shouldn't be too hard

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] How to build pages only when a specific condition is meet? In reply to
My Links has a lot of new parts inside without any plugins made.
The last update was ... hmmm ... hmmmmm ... hmmmmm ... somewhere in the 90ies?

Anyway, a plugin is nice, but if you need a solution you need a solution, and then an answer like "Use a plugin, Luke!" is not really helpful.

And with a tool like "Beyond compare" you made the trick in some minutes if needed.


Anyway, try the modding in build.pm, it should be an easy story with another conditional.
Quote Reply
Re: [Robert] How to build pages only when a specific condition is meet? In reply to
Thank you for your suggestions.

Robert, I am not very good with perl and I cannot change the script by myself. I will probably go with the plugin option, even though as you mentioned the script is very old.