Gossamer Forum
Quote Reply
new template pages?
Hi,

First I need to know how to call my own custom templates? I've created just a basic body template (goes in between header and footer) and named it simply pricecheck.html and one named priceresult.html

How do I call that with the page.cgi file?

The next part is the custom part that i would need assistance with as I don't even know where to start.

I have a database of prices in a table named price

I want to place a simple form on the pricecheck.html template that allows a user to enter in up to 10 item names.

When submitted this would check the names against the name column in the price table, and bring back the results of that row in the price table and show them it on the priceresult.html template.

Now I know this isn't strictly Links SQL related, however Im thinking that it's probably already got the guts in place and only needs maybe some template globals to accomplish all this. But for where to start, do it, or end it, Im at a loss as I don't have that knowledge.

All help appreciated.

Structure of the price table:
name
price
stdev
average
high
low
change
rawn

So when someone enters the name of [CARD A] it should look into the price table and find the row with [CARD A] listed as the name and then gather the rest of the fields in the price table and bring them back on the priceresult.html template for me.

Thanks
Quote Reply
Re: [Westin] new template pages? In reply to
page.cgi?p=template_name

..and template_name would be template_name.html

Re the other thing, it would need a whole script for that - so really a custom job.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] new template pages? In reply to
I did: page.cgi?p=template_addmore.html
but get the message: Invalid SiteHTML method: 'site_html_template_addmore.html'.

Even doing page.cgi?template_home.html brings back error: Invalid SiteHTML method: 'site_html_template_home.html'.

In the templates I do have a template page named addmore.html so not sure what the problem might be.

Thanks,


P.S. Yeah I had a feeling it was going to be more than something simple to do the rest of it. I know of simple database scripts that could probably be hacked apart to get just the parts I need (lookup row by name in table, return formatted results of that row on template page or page html that is written into the php or cgi script itself). I'll look around to see how far I get before figuring out where to get funds to pay someone for this, since we are run a site that doesn't make any money in any way.

Last edited by:

Westin: May 5, 2009, 4:41 AM
Quote Reply
Re: [Westin] new template pages? In reply to
No need for the .html at the end =) (just the template itself that needs the .html)

In your example, addmore.html would be called with page.cgi?p=addmore

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] new template pages? In reply to
Okay, get different error message now:

Invalid SiteHTML method: site_html_template_addmore (template_addmore.html). The template does not exist in 'luna'.

when I call it as page.cgi?template_addmore

Even if I try page.cgi?template_home

I get a error message Invalid SiteHTML method: site_html_template_home (template_home.html). The template does not exist in 'luna'.


Maybe I'm not saving the templates a way that I should be?
Quote Reply
Re: [Westin] new template pages? In reply to
Okay, got it now.

It's to be called simply
page.cgi?p=addmore

And it brings up the addmore template contents.


Thanks,
Quote Reply
Re: [Westin] new template pages? In reply to
Sorry for another post on this subject, wanted to make sure that Andy sees it.
I took the existing template (home.html) and saved it as (template1.html)

Then when I call up the page with page.cgi?template1

All the category contents is missing and there is a message that says:
There are Unknown Tag: 'grand_total'
Can't a custom template make use of the tags and other links language stuff that is available in the standard luna templates in our own custom template pages? Or was the template system designed not to do that and to only bring up our own "static" type page content, within the confines of the header and footer to make it look the same as the rest of the pages?

Last edited by:

Westin: May 5, 2009, 4:57 AM