Forums / Developer / database and tpl?

database and tpl?

Author Message

Rizwan Ahmad

Friday 11 July 2003 5:23:46 am

How to use database related function in the tpl?

Karsten Jennissen

Friday 11 July 2003 5:34:14 am

Could you please explain a bit more what you are trying to do? This info is too short to give an answer. :-)

Karsten
P.S.: Please don't double or cross-post. Thanks.

Rizwan Ahmad

Sunday 13 July 2003 11:57:07 pm

I want to write a qurey in the tpl to extract the data according to the query. The fetch command extract the specified data only. What if I want to use my own query. Although the answer is available at http://www.ez.no/developer/ez_publish_3/documentation/development/libraries/ez_db/data_retrieval but that does not specify how I can incorporate the php in tpl

Karsten Jennissen

Monday 14 July 2003 12:51:13 am

Hi,

now we have two threads with the same question. :-) Anyhow, PHP is not available in templates (seperation of code and layout). If you want to do something that the current template functions / operators do not support, you will have to write an extension. If it is a quick PHP call you want in your template, you might consider writing a template operater. In the Admin under Set-up there is a point called RAD. You can use this to write the operator.

Check the docs on extensions (link I posted in the other thread), on how to do this.

Karsten