We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags

Question

Hi there! We are in the process of evaluating TWiki for use as our company intranet.

We have a MySQL? database which contains a table of Software Requests.

In a static topic I have been able to create a DBI query using the DBIQueryPlugin? which lists a subset of the records in the table.

What we would like to do is have a link in each record in the list which takes you to a page which gives full details of the record that was selected.

We don't want to create a topic for each record, so I was wondering if there is a way to use a template to achieve this.

For example, lets say that a particular record in the list in topic "OpenIDs" has an ID of 12712. I was thinking that I could call a template using the format: view/Main/OpenIDs?template=RequestDetails&param1=12712.

Is this possible?

Sorry if this has been asked before or is answered elsewhere. I have spent a couple of days looking through this huge site and trawling through the templates themselves, but could not find anything that helps.

Thanks in advance for any help.

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Ubuntu
Web server: Apache/2.0.55
Perl version: 5.8.7
Client OS:  
Web Browser:  
Categories:  

-- DuncanKinnear - 07 Dec 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Yes, for sure. You can put almost anything in a template that you can put in a topic, and a %DBIQUERY call is no exception. To demonstrate this, just take a copy of view.pattern.tmpl, and call it view.reqdet.tmpl. Add your DBIQUERY with the %URLPARAM{reqdet} into one of the DEFs e.g. the beforetextcontents def. Then add the ?cover=reqdet parameter to the URL view/Main/OpenIDs?cover=reqdet&id=12712. You will probably need to experiment a bit with what goes where in the template.

-- CrawfordCurrie - 14 Dec 2006

 
Change status to:
Topic revision: r2 - 14 Dec 2006 - 13:01:29 - CrawfordCurrie
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback