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

Static site with Dynamic Detail pages

Quote Reply
Static site with Dynamic Detail pages
Hi:

I have always been one to mess with the Links, but that is all of us, isn't it? Anyway, I have found Links works best for me with static pages- basically all the Category pages- which link to Dynamic detail pages.



I just upgraded to the 2.0.5, and had a surprise- I could not dynamically link to the detailed pages without enabling that detailed pages in admin. OK. But this then caused them to be built when the static site is rebuilt every night via cron. Well, I have 35,000 detail pages! I do not want them all built!



So, I just edited nph-build.cgi, and commented out the build_detailed parts. Problem hacked.



But looking at admin, I think either I misunderstand it, or I am missing something, or perhaps one more option could/should be added. Is it possible to enable detail pages, but then add a asecond option NOT to build them? Either that, or disable detail pages, but not have Links prevent them from being shown dynamically.



Make sense? Am I just crazy? Just my 2 cents! Thanks!



Dave Koch
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Static site with Dynamic Detail pages In reply to
Whoops- wrong forum... sorry!



dave
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Static site with Dynamic Detail pages In reply to
Hi carfac;
i have add today a small trigger in form of a new field Detailed Yes/No to build or not build dynamic pages;
think at this point is the solution.

Find sub _build_detailed { in nph-build.cgi;
there is:
# Only build validated links.
$cond ||= new GT::SQL::Condition;
$cond->add ('isValidated', '=', 'Yes');

Its dirty but here you can add a condition that never will be true; like isValidated=Nope
and no single page will be build.

OK, all cry now ;-) but it runs.

Now the better way:

in sub build_all {

you could comment out all the not needed calls:

# Build Detailed Page.
#### GT::Plugins->dispatch ("$CFG->{admin_root_path}/Plugins", 'create_detailed', \&_build_detailed, {});

the same maybe to:
sub build_changed { or build_staggered.

What im looking for is to set the variable for building in the cat-table

with a new field in table cat: Detailed yes/no;

then all i need is to get the sql-query:

if category.detailed=yes -> build; else build not.

I work on it.

Robert
Quote Reply
Re: [carfac] Static site with Dynamic Detail pages In reply to
This is why I wrote detail_page.cgi :)

It will build your detail page, and staticly link back to the site. It's in the plugins download area of the admin, and you need to make the changes to the header as indicated in a thread below to get it working with 2.1.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Static site with Dynamic Detail pages In reply to
In Reply To:
This is why I wrote detail_page.cgi :)

It will build your detail page, and staticly link back to the site. It's in the plugins download area of the admin, and you need to make the changes to the header as indicated in a thread below to get it working with 2.1.


PUGDOG, could you please indicates changes to the header that are needed? Located this thread via a search but haven't a clue what to search for to locate the changes. I've just downloaded and installed the Detailed_Page module and cannot locate the thread you've referred to for changes.

Thought you might like to know, too ... the Detailed_Page Help link added to the admin section contains the opening lines:
Bad_Link.cgi should be in your LinkSQL CGI directory -- where jump.cgi, etc are located. It needs to be chmod 755 .
Quote Reply
Re: [Karen] Static site with Dynamic Detail pages In reply to
I think these changes should have been added into the plugin now so I wouldn't worry about them - unless it doesn't work?
Quote Reply
Re: [afinlr] Static site with Dynamic Detail pages In reply to
Thanks for the reply. Yes, the mod appears to be working properly so the changes have probably been implemented into the scripts. An incorrect filename in the help page threw a bit of uncertainty in there.