Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Accessing a specific record in the admin via custom template.

Quote Reply
Accessing a specific record in the admin via custom template.
Greetings,

I'm using DBMan SQL to run an online ordering service for Mortgage Location Surveys. Everything is working well, but now I have a problem. I've built two custom templates. One is an invoice, and the other is a cover sheet. Both are setup to plug in information from the database.

What I want to do is make them available in the Admin area only, as only the admin should be able to create an invoice and cover sheet for each record.

So my question is, how do I access those templates so that a specific record is loaded. In other words, I want the my client to be able to search for a record in the admin, find the one they want, and then be able to click a link that takes them to the invoice template, with that records data filled in. Then they can just print it out. Ditto with the cover sheet.

I envision this being two links off of the Modify Record template, but I don't know how to write the URL.

Suggestions?
Quote Reply
Re: [VanGogh] Accessing a specific record in the admin via custom template. In reply to
This is the last thing I need to do to finish this project, and I could REALLY use some help. IF there is anything I haven't explained clearly, please tell me and I'll try again.

Can somone PLEASE offer some assistance?
Quote Reply
Re: [VanGogh] Accessing a specific record in the admin via custom template. In reply to
I'd say there is no way to do that with the standard version of DBMan SQL. It's required some custom work here. Please contact me if interested.

TheStone.

B.
Quote Reply
Re: [TheStone] Accessing a specific record in the admin via custom template. In reply to
Okay then... Well, what if I change my approach? Is it possible to specify a particular template for a search result to show up in on the front end? (The user end)

As the database is setup now, users can only add records, and view their own. If I gave the site owners an admin level account, they could view everyones records. I already know how to make a different menu show up based on the person's user level, so maybe I could use template selection on the front end to load up a particular search result into the invoice or cover sheet templates.

Is is possible to use more than one search results template on the front end?
Quote Reply
Re: [VanGogh] Accessing a specific record in the admin via custom template. In reply to
You can do something like this in search_results.html:

<%if tpl eq 'invoice'%>
<%include invoice_form.html%>
<%elsif tpl eq '....'%>
<%include ....%>
<%else%>
the search results html
<%endif%>

TheStone.

B.