Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Creating a new template page?

Quote Reply
Creating a new template page?
Hi,

Question #1:

How does one create a new template page, that is processed by the GLinks engine?

i.e.: I want to be to use template globals and other dynamic elements in the new pages ...

-

Question #2:

What is the code used to identify the current page? For instance, I would like to conditionally insert text on a page if the current page in the 'home' page and the 'detail' page but I don't want the text to appear in say the 'links' page.

Many thanks,

K
Quote Reply
Re: [kajukenbokid] Creating a new template page? In reply to
1) if you link to p=template_name and create a template named "template_name.html", then you should be able to do what you're trying to do.

2) I'm sure you figured out that you can use the page_id tag for this.

Adrian
Quote Reply
Re: [brewt] Creating a new template page? In reply to
Hi,

You said:

" I'm sure you figured out that you can use the page_id tag for this"

I don't follow what you mean?

-
So are you saying the URL would be:

mysite.com/cgi-bin/directory/p=template_name

Thanks,

K
Quote Reply
Re: [kajukenbokid] Creating a new template page? In reply to
In Reply To:
" I'm sure you figured out that you can use the page_id tag for this"

I don't follow what you mean?
You already have other threads using the page_id tag...

In Reply To:
So are you saying the URL would be:

mysite.com/cgi-bin/directory/p=template_name
Oops, I forgot to mention that you use it by passing it to page.cgi, so page.cgi?p=template_name

Adrian
Quote Reply
Re: [brewt] Creating a new template page? In reply to
Hi,

I appreciate the help, but I am still not getting it to work:

I created a page called help.html and placed it in the luna template folder under the CGI bin.

I then created this URL:

mysite.com/directory/page.cgi?p=help

And I get a 404.

Thanks again.

K
Quote Reply
Re: [kajukenbokid] Creating a new template page? In reply to
Hi,

Make sure that mysite.com/directory/page.cgi is working. It seems that the page.cgi is not on that path.

Hope that helps,



Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Creating a new template page? In reply to
Thanks but:

1. How do you verify that mysite.com/directory/page.cgi is working or not? It seems it isn't ...

2. How to you verify
what path page.cgi is on?

K

Quote Reply
Re: [kajukenbokid] Creating a new template page? In reply to
The error 404.

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Creating a new template page? In reply to
 I figured it out.

CIAO

Last edited by:

kajukenbokid: Apr 23, 2006, 7:56 PM
Quote Reply
Re: [kajukenbokid] Creating a new template page? In reply to
In Reply To:
I created a page called help.html and placed it in the luna template folder under the CGI bin.
I then created this URL:
mysite.com/directory/page.cgi?p=help
And I get a 404.[/quote]
Shouldn't the test url be?...
mysite.com/cgi-bin/links/page.cgi?p=help

To make sure the page is where you think it is:
mysite.com/cgi-bin/links/admin/templates/luna/local/help.html
or something along that line if you are using luna and putting your
templates in the proper location so they not get over-written on upgrades.

Hope that helps.
Chris

RGB World, Inc. - Software & Web Development.
rgbworld.com
Quote Reply
Re: [rgbworld] Creating a new template page? In reply to
Thanks.

My problem was that I was trying to use this var (<%config.build_root_url%>) rather than the actual url string.

Essentially no reference to cgi-bin in the above var.

BTW:

I already edited my new template file with GLinks admin thus creating my safe copy in local. Thanks for the tip though.

K