Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Re: Home/Top Rated/Cool/New... Not Creating

Quote Reply
Re: Home/Top Rated/Cool/New... Not Creating In reply to
If you want them to work, yes you do. However, you can move the menus into a global variable above the %globals variable in site_html_templates.pl and then change the %globals variable to pass it to all templates. You would do something like this:

Change this:

Code:
# You can put variables here that you would like to use in any
# of your templates.

%globals = (
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);

to read:

Code:
# You can put variables here that you would like to use in any
# of your templates.

$site_menu = qq~<p><small class="menu">|
<a class="menulink" href="$build_root_url/$build_index">Home</a> |
<a class="menulink" href="$build_add_url">Add a Resource</a> |
<a class="menulink" href="$build_modify_url">Modify a Resource</a> |
<a class="menulink" href="$build_new_url/$build_index">What's New</a> |
<a class="menulink" href="$build_cool_url/$build_index">What's Cool</a> |
<a class="menulink" href="$build_ratings_url/$build_index">Top Rated</a> |
<a class="menulink" href="$build_email_url">Email Updates</a> |
<a class="menulink" href="$build_jump_url?ID=random">Random Link</a> |
<a class="menulink" href="$build_search_url">Search</a> |
</small></p>
~;

%globals = (
site_menu => $site_menu,
date => &get_date,
time => &get_time,
db_cgi_url => $db_cgi_url,
build_root_url => $build_root_url,
site_title => $build_site_title,
css => $build_css_url,
banner => ''
);

Now you can delete the menus from the template file and just use <%site_menu%> inside the templates instead where you want the menu to display.

I hope this helps.

[This message has been edited by Bobsie (edited June 19, 1999).]
Subject Author Views Date
Thread Home/Top Rated/Cool/New... Not Creating vjm 2340 Jun 19, 1999, 3:39 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
Bobsie 2241 Jun 19, 1999, 11:32 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
vjm 2234 Jun 19, 1999, 12:04 PM
Post Re: Home/Top Rated/Cool/New... Not Creating
vjm 2230 Jun 19, 1999, 12:06 PM
Post Re: Home/Top Rated/Cool/New... Not Creating
Bobsie 2249 Jun 19, 1999, 1:58 PM
Post Re: Home/Top Rated/Cool/New... Not Creating
vjm 2260 Jun 20, 1999, 3:46 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
Bobsie 2244 Jun 20, 1999, 4:12 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
vjm 2256 Jun 20, 1999, 7:29 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
Bobsie 2265 Jun 20, 1999, 6:54 PM
Post Re: Home/Top Rated/Cool/New... Not Creating
vjm 2237 Jun 23, 1999, 10:58 AM
Post Re: Home/Top Rated/Cool/New... Not Creating
Bobsie 2320 Jun 23, 1999, 12:04 PM