I think I maybe didn't explain the problem quite clearly or I don't understand the acquisistion reply. Here's the paths : /dbtitle the method /dbtitle_query the sql /webmaster/a_test a test document dbtitle is the method, dbtitle_query is the SQL, a_test is a document. The sample document, a_test, has the following contents (which doesn't work). " a link to <dtml-call dbtitle(74)> which is a proxy or local url" Trying to pass the argument 74 to dbtitle hoping to have the rendered results of dbtitle show up in the document a_test. Here are some other permutaitons of a dtml tag I have tried in the document a_test without prefered results: <dtml-var dbtitle(mytitle=74)> <dtml-var dbtitle?mytitle=74> <dtml-let mytitle=74><dtml-in dbtitle></dtml-let> <dtml-var expr="mytitle=74"><dtml-in dbtitle> What I'm thinking is I need a tag that will pass the value of mytitle in the name space to the call to dbtitle. If you go to http://www.library.appstate.edu/dbtitle?mytitle=74 it will give as its source code in your browser: <a href="http://0-biblioline.nisc.com.wncln.wncln.org/scripts/login.dll? BiblioLine&dbname=QFSD;done=referer">Family & Society Studies Worldwide</a> but in my browser in my domain the source code is : <a href="http://biblioline.nisc.com/scripts/login.dll? BiblioLine&dbname=QFSD;done=referer">Family & Society Studies Worldwide</a> That part works, what I want to do is to be able to give people that edit web pages on my server a single tag with a record number for these hyper links to appear in there web pages when some one accesses their page for example my test page, a_test. I don't need to access the method or query in a different path, I want the results of the method to appear in a document but I haven't figured out how to make the call to that method and pass it the argument so it can return the correct URL. Thomas 9/26/2003 11:04:47 AM, Thomas M G Bennett <bennettt@pm.appstate.edu> wrote:
Zope Version (Zope 2.6.1 (binary release, python 2.1, linux2-x86), python 2.1.3, linux2)
Python Version 2.1.3 (#1, Sep 19 2002, 13:15:46) [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)]
System Platform linux2
I have searched the Zope site, emails, lab, etc and haven't found what I hoped would be a shorter solution rather than write a python script. So, here is what I want to do.
I am trying to make available to my web page editors a single tag which would display one URL on the local domain and a different URL to all others. Below I have pasted in my ZSQL and Method which work fine if you supply a record number in a form or in a URL. The Method displays an Online Database Title which is hyperlinked to the online database.
If you are in our domain you get the hyperlink which allows access to the database per our IP domain. If you are outside our domain you get a hyper link that allows you to login to our server and use it as a proxy, then the database will allow you access. I've tried as a tag in another page several different permutations of:
<dtml-call dbtitle(47)>
I've also tried REQUEST.set, dtml-let, and dtml-set . If you put the url
http://www.library.appstate.edu/dbtitle?mytitle=74
in the location bar of the browser (or any other number from 1 to 108) the method will disply the hyperlinked title to that databased based on record number.
==================================== DTML METHOD ip_add_flag returns a 1 or 0 depending on if you are in our domain or not ==================================== <dtml-call "REQUEST.set('hostname',ip_add_flag(REMOTE_ADDR))">
<dtml-in db_title_query size=1 start=query_start>
<a href="http://
<dtml-if hostname> <dtml-var vdb_local_url null=""> <dtml-else> <dtml-var vdb_proxy_url null=""> </dtml-if>
<dtml-var vdb_title null="">"></a>
</dtml-in>
=================================== Z SQL one argument: mytitle =================================== select vdb_title, vdb_local_url, vdb_proxy_url from vdb_data where vdb_rec=<dtml-var mytitle>
Thanks,
Thomas
PS: Usually I don't need to ask for assistance because the answers are usually already posted here. Thanks to all of those responders that share their insight and knowledge here by answering these requests.
----------------------------------------------------------------- Use The Help Desk at http://linux.library.appstate.edu/help ----------------------------------------------------------------- Rock and Rule Zope Rocks -- http://www.zope.org Python Rules -- http://www.python.org ----------------------------------------------------------------- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III University Library Voice: 828 262 6587 FAX: 828 262 2797
"Windows: A 32-bit GUI on top of a 16-bit wrapper around an 8-bit interpretation of a 4-bit operating system written by a 2-bit company." -David Simmons
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
----------------------------------------------------------------- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III University Library Voice: 828 262 6587 FAX: 828 262 2797 "Windows: A 32-bit GUI on top of a 16-bit wrapper around an 8-bit interpretation of a 4-bit operating system written by a 2-bit company." -David Simmons