[Zope] Calling a Variable

eXt news.crumbler at gmail.com
Thu Mar 8 13:33:06 EST 2007


Dnia czwartek, 8 marca 2007 18:48, tonylabarbara at aol.com napisał:
> Hi;
> I thought I could call a variable in a page template by defining it and then 
putting a ? in front of it in a URL, like this:
You messed some things. First go to google.com and look into address bar in 
your browser. Then enter any value into search box (plz don't ask me what 
is "any" value ;) ) and click "search". Look into the address bar again. You 
will see there something like: 
google.com?variable_name=variable_value&another_variable_name=another_variable_value 
etc. google.com is in your case base_url, and things after ? and & are 
variables that are passed to server (in your case Zope) from your browser 
(via request).

> <html tal:define="global base_url here/baseURL;
> template_id string:index;
> here python:here.restrictedTraverse('s/c/x/root/en-us/Help')">
Do you really want to define a variable named "here"?

> <a href="?base_url/contactus.pt">
What you want here is: base_url/contactus.pt?variable=variable_value. To put a 
variable value into href attribute use tal:attributes="href ..."

> Please tell me what I'm doing wrong.
I tried to be a bit more specific that guys in other answers but please do 
what they suggested to you: read zope book :)

> Tony

-- 
Jakub Wisniowski


More information about the Zope mailing list