Gossamer Forum
Home : Products : Gossamer Links : Discussions :

To do 2 versions of all pages...

Quote Reply
To do 2 versions of all pages...
Hello all,
I have a little trouble.

I want to build all my pages in 2 versions:
one with Search area with only text-field "query" and with link "Advanced Search" to another page, and another page with Search area which contains also radio buttons "substring/exact word" and "all words/any words".

I want to build static pages, do not use page.cgi.

How can i do it, and what will be the result?
index_advanced_search.html and index.html with link "Advanced Search" to index_advanced_search.html in each category or how?

Thank you, very much!

Anton Permyakov.
Quote Reply
Re: [peant] To do 2 versions of all pages... In reply to

This isn't easy to do unfortunately. It involves changes to the code. Basically you would want to edit nph-build.cgi and have it create a second html page, most likely using a different template.


Gossamer Threads Inc.
Quote Reply
Re: [Alex] To do 2 versions of all pages... In reply to
Hm... and would it more easy to do it with page.cgi and how can i do it?

Thank you!
Anton Permyakov
Quote Reply
Re: [Anton_P] To do 2 versions of all pages... In reply to
If you were using dynamic pages (page.cgi) you could set a flag to carry through, perhaps a=1 or a=0. Depending on the flag, you'd include either the search_basic.html or search_advanced.html into each page.

Perhaps if you explained the process you want to do, it might make it easier to offer suggestions.

I think I know what you are trying to do, but I'm not sure. If you use SSI you could do the same thing, or even with PHP. You would just include (expand) the search options depending on a value set either by the users profile, or something they click (a toggle).

The problem as Alex pointed out, is to build static pages you'd have to do major alterations to the build process -- and it would probably be buggy, and not easily migratable up through new versions.

You'd have to have a good, reliable means of switching from the 'basic' tree to the 'advanced' tree and back, and that would possibly require advanced fiddling with the a/href links (similar to the build in two languages problem).

Dynamic pages, SSI or PHP are probably the best options, in that order.

PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] To do 2 versions of all pages... In reply to
Thank you, Pugdog.

I've done it Smile. I add
<a href="<%db_cgi_url%>/page.cgi?g=<%if category_name_escaped%><%category_name_escaped%><%endif%>&s=1">Advanced Search</a>
link on my static pages - so, now first version of my pages is static, and version with Advansed Search area creates dynamically...

I don't use SSI or PHP now, only Perl.
Anton Permyakov.