Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Add a site, Modify a site - not show in menu?

Quote Reply
Add a site, Modify a site - not show in menu?
Is it possible to set a variable or change a few lines of code so that "Add a site" and "Modify a site" do not appear in the menu?

Thanks.
Quote Reply
Re: [Tricky Ricky] Add a site, Modify a site - not show in menu? In reply to
It's not too tricky, Ricky... Go through your templates (if you use 'em otherwise go through site_html.pl) and remove what you want from EACH page. It'll look like this in templates:

Code:
<p><small class="menu">|
<a class="menulink" href="<%build_root_url%>">Home</a> |
<a class="menulink" href="<%db_cgi_url%>/add.cgi">Add a Site</a> |
<a class="menulink" href="<%db_cgi_url%>/modify.cgi">Modify a Site</a> |

<a class="menulink" href="<%build_root_url%>/New">What's New</a> |
<a class="menulink" href="<%build_root_url%>/Cool">What's Cool</a> |
<a class="menulink" href="<%build_root_url%>/Ratings">Top Rated</a> |
<a class="menulink" href="<%db_cgi_url%>/jump.cgi?ID=random">Random Link</a> |
<a class="menulink" href="<%db_cgi_url%>/search.cgi">Search</a> |
</small></p>

Remeber, that's HTML, not Perl, so if you want to comment it out, use <!-- -->, or just delete the parts you don't want. Remember...keep a backup.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Add a site, Modify a site - not show in menu? In reply to
Thanks for the quick and very helpful response Leonard.

You mention using either templates or site_html.pl.

In searching through the forums I have noticed some discussion concerning using templates or using site_html.pl.

Is there a FAQ somewhere that clearly spells out the advantages and disadvantages of each?

Richard
"Be practical, expect miracles." - James T. McCay
Quote Reply
Re: [Tricky Ricky] Add a site, Modify a site - not show in menu? In reply to
Don't know about a FAQ, but here's what I know...

Using non-templates (site_html.pl) enables you to edit ALL your pages from that one file.

Using templates seems to be more common, thus more mods are available for it. Plus, I like being able to make changes to the templates through the admin.cgi interface, instead of the .pl file.

Other thoughts from non-templaters?


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Add a site, Modify a site - not show in menu? In reply to
If you really know what you're doing, or require something a bit more complex, then using site_html.pl may prove to be more flexible. Otherwise, for most users, templates are the best way to go (ie.. no accidently missing a bracket and breaking Links Sly)

Philip
------------------
Limecat is not pleased.