Gossamer Forum
Home : Products : DBMan SQL : Discussion :

DBman SQL templates...

Quote Reply
DBman SQL templates...
Hi,

I've just made the switch to DBMan SQL from DBMan. I have a question regarding the templates.

I've created my own template "display_custom.html" but how do I get the search results to use my template rather than the default one? I still want to keep the default template so I don't really want to just replace it.

Apologies if this is really easy to answer, but I couldn't find it in the documentation. Blush

cheers

Rob
Quote Reply
Re: [oval_rob] DBman SQL templates... In reply to
You should change the search_results.html like:

....
<%if db eq 'table_name'%>
<%include display_custom.html%>
<%else%>
<%Dbsql::HTML::generate_search_results%>
<%endif%>

Hope that helps.

TheStone.

B.
Quote Reply
Re: [TheStone] DBman SQL templates... In reply to
Erm... not really...

Can't I just tell it what template to use from the url?

like:

db.cgi?db=default&user=default&template=search_custom.html

Is that not possible?

Rob
Quote Reply
Re: [oval_rob] DBman SQL templates... In reply to
No, that is not possible. There is another way to setup which template ( a folder ) should be used for a table at Admin - Tables - Setup.

TheStone.

B.
Quote Reply
Re: [TheStone] DBman SQL templates... In reply to
So I can only creat custom templates of the ones that are already there then? I can't create "in between" templates then?
Quote Reply
Re: [oval_rob] DBman SQL templates... In reply to
Is there the equivalent of the html.pl file somewhere?

In DBMan I just created my own templates in html.pl and then referenced them in db.cgi, can I not do something similar in DBMan SQL? If so how??

Also, how do I form relationships from different tables?

Thanks

Rob

ps: I ask a lot of questions don't I... Blush