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

Changing home page designation universally. How?

Quote Reply
Changing home page designation universally. How?
Is there an easy way to designate a different Home Page for my site, rather than the default Links assigns, without editing each template page?
Quote Reply
Re: Changing home page designation universally. How? In reply to
Is this what you are talking about (found in links.cfg)?

Quote:
# Site Title, the default title to use. You should really spend some time customizing
# the directory though!
$build_site_title = 'Gossamer Threads Links';

Or are you speaking about the path to the home page (also in links.cfg)?

Quote:
# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/alex/links/pages";
$build_root_url = "http://localhost/links/pages";
Quote Reply
Re: Changing home page designation universally. How? In reply to
I want the 'HOME' link on each of my Links pages to point to a different home page [outside of Links]. For instance, this is my real home page I want designated...
http://server4.hypermart.net/mr-k/cworld/
Quote Reply
Re: Changing home page designation universally. How? In reply to
In the category.html template, just change <a class="menulink" href="<%build_root_url%>">Home</a> to point to whatever page you want it to.

You can do the same in the other template files as well.

If the menu is going to be the same for all the templates, you can delete the menu from the template files and setup a "standard" menu in the Globals section of site_html_template, include it in the %globals variable, and then use it in any template. For example, if you have a menu assigned to a variable called $site_menu and "site_menu => $site_menu," is in the %globals variable, you can then use <%site_menu%> in the template files. That way, you only need to edit it in one place (when/if it needs editing) and it will happen on all templates at the same time when you rebuild.

Does that answer the question?

[This message has been edited by Bobsie (edited March 14, 1999).]
Quote Reply
Re: Changing home page designation universally. How? In reply to
Thanks, again. Works fine now.
Quote Reply
Re: Changing home page designation universally. How? In reply to
how can i designate a different Home Page for my site but keep the subcategory under the old folder?
for example my homepage is http://www.mysite.com/links
all subcategory are at http://www.mysite.com/links/subcategroy1
http://www.mysite.com/links/subcategroy2
http://www.mysite.com/links/New
so i want to move the homepage to
http://www.mysite.com/
and keep the subcategory at the same old folder
is it possible?
Quote Reply
Re: Changing home page designation universally. How? In reply to
theguy,

Yes it is possible. Just bring up nph-build.cgi and go to sub build_home_page. Find the following code:

Quote:
open (HOME, ">$build_root_path/$build_index")

and change $build_root_path to the path you want to use for the home page. Or, alternatively (and a better way), add a path to links.cfg for the home page such as:

Quote:
$build_home_path = "/path/to/your/home/page";
$build_home_url = "http://www.mysite.com/";

Then change $build_root_path above to $build_home_path in sub build_home_page. You may also have to change code elsewhere in your files if they make reference to the home page (such as the menu) to use $build_home_url.

I hope this answers your question.