Gossamer Forum
Home : Products : Gossamer Links : Pre Sales :

Includes elsewhere

Quote Reply
Includes elsewhere
Hi all,
cause of changing my include_files from some other scripts, i want them outside the templates-dir;
may you have an idea how to change in templates.pm (admin.html.pm)

sub parse()
...
# Parse includes, do this first so that the includes can include
# template tags.
$temp =~ s#$begin\s*include\s*(.+?)\s*$end#
if (exists $self->{'inc'}{$root}{$1}) { $self->{'inc'}{$root}{$1}; }
else {
if (open (INC, "${$self}{'ROOT'}/$1")) {
$self->{'inc'}{$root}{$1} = join ("", <INC> );
close INC;
$self->{'inc'}{$root}{$1};
}
else {
"Can't find file: ${$self}{'ROOT'}/$1";
}
}
#goe;

to something like $LINKS{include_dir} in links.pm ?



Quote Reply
Re: Includes elsewhere In reply to
Alex may beat me to an answer... i have to look at this.

I know I have a way to change siteHtml and Links.pm to allow templates to exist in other directories, but I have not looked at the include file issue. I will have to, eventually :)

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Includes elsewhere In reply to
Hi,

Although this takes some time to get right at first, it is possible to have includes from other directories.

I do something like this:
<%include ../../../includes/header.html%>

I have a directory off of my root that I keep all of my includes in, and I just call off that one for my other needs.

Hope that helps. Smile



Robert Blackstone
Webmaster of Scato Search
http://www.scato.com