Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

template path

Quote Reply
template path
I'm new to Links SQL, but I couldn't find in links.pm how to change the path or url to where my templates are located. How can I change this?

Thanks


------------------
- Jonathan Gamble

http://www.linkondemand.com/



Quote Reply
Re: template path In reply to
In DB_Utils.pm in the Links subdirectory, there is a subroutine:

sub load_template {


In that, you'll see the path to the templates directory defined as:

$LINKS{admin_root_path}/templates

There are some really good reasons to not play with that, such as the dynamic templates, and the t=new_template parameter.

$LINKS{admin_root_path}/templates/$root

This is the path to the dynamic generated template directory. $root is a subdirectory off the default "templates" directory.

If you really, really want to move this, the first thing I would try is a sym-link from Unix, so that .../admin/templates is a symlink to the place you really want to put it, or, if that's not an option, then to define a new variable in the Links.pm file:

$LINKS{template_root_path} =

pointing to the new location of your templates, then in the subroutine above, change the admin_root_path to template_root_path.

The reason to keep _root_ in it, is so that you don't forget that dynamic templates are still going be served from subdirectories of that directory.

The most "portable" way from version to version of links, is to use the sym-link idea.

This path change will require you to edit the DB_Utils.pm file with each upgrade, but the value in Links.pm should remind you to do that.





------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/








Quote Reply
Re: template path In reply to
Thank You. I have been looking everywhere for it

------------------
- Jonathan Gamble

http://www.linkondemand.com/