Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Chris Withers

[EMAIL PROTECTED] wrote:

I tried this:

but got this error:
Error Type: TypeError
Error Value: a_script() takes exactly 1 argument (0 given)


Yeah, as you discovered later, leaving bits of things people suggest off 
is stupid ;-)



So it doesn't look like the "string:${..." workaround worked :(


It's not a workaround. There's nothing to workaround.


And I don't think I need to URLquote.


Oh? And what happens when x contains non-url-safe characters like 
spaces, slashes, colons, etc?


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Chris Withers

Andreas Jung wrote:






...but next you'll be wondering how to url quote x.


By using the well-know url_quote() or url_quote_plus() methods.


...and in a page template? ;-)

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread tonylabarbara

Oops...forgot the "absolute_url" part <:-) Works fine now. Thanks!

Tony


-Original Message-
From: Chris Withers <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 11:05 am
Subject: Re: [Zope] How Do I "Structure" This?



Ah Tony,?
?
looks like the penny is yet to drop...?
?
[EMAIL PROTECTED] wrote:?
> Bummer. Well, I'm trying to call a script that will render content to the 
> Web, like this:?
> ?
?
My guess is that what you're _really_ trying to do here is:?
?
?
?
...but next you'll be wondering how to url quote x.?
?
I feel we're fighting a loosing battle here...?
?
Chris?
?
-- Simplistix - Content Management, Zope & Python Consulting?
? - http://www.simplistix.co.uk?



AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Garito
In my opinion the correct sentence will be:



But they are trying to say you that structure don't do anything here because
an anchor expect or a URL or a javascript

You are trying to put an html code into an anchor but this don't work on
HTML or xHTML

If you want to execute the scritp when the user clicks on the anchor you
need to use something like:

 -> 

and when the user clicks the anchor the script will be executed

can you find a reference help about HTML o xHTML with an anchor like this:



no, isn't it? then structure don't do nothing here...

2007/8/15, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> I tried this:
>  but got this
> error:
> *Error Type: TypeError
> Error Value: a_script() takes exactly 1 argument (0 given)*
> Next, I rewrote the script to put in a try statement for the variable, to
> test that, but before I even got to test I looked at the rendered code from
> the above line and it gave me this:
> 
> So it doesn't look like the "string:${..." workaround worked :(
> And I don't think I need to URLquote.
> TIA,
> Tony
>
>
> -Original Message-
> From: Chris Withers <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; zope@zope.org
> Sent: Wed, 15 Aug 2007 11:05 am
> Subject: Re: [Zope] How Do I "Structure" This?
>
>  Ah Tony,
>
> looks like the penny is yet to drop...
>
> [EMAIL PROTECTED] wrote:
> > Bummer. Well, I'm trying to call a script that will render content to
> the Web, like this:
> > 
>
> My guess is that what you're _really_ trying to do here is:
>
>   tal:attributes="href string:${here/a_script/absolute_url}?avar=${x}"/>
>
> ...but next you'll be wondering how to url quote x.
>
> I feel we're fighting a loosing battle here...
>
> Chris
>
> -- Simplistix - Content Management, Zope & Python Consulting
>   - http://www.simplistix.co.uk
>  --
> AOL now offers free email to everyone. Find out more about what's free
> from AOL at *AOL.com* <http://www.aol.com?ncid=AOLAOF0002000437>.
>
> ___
> 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 )
>
>


-- 
Mis Cosas
http://blogs.sistes.net/Garito
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread tonylabarbara

I tried this:

but got this error:
Error Type: TypeError
Error Value: a_script() takes exactly 1 argument (0 given)
Next, I rewrote the script to put in a try statement for the variable, to test 
that, but before I even got to test I looked at the rendered code from the 
above line and it gave me this:

So it doesn't look like the "string:${..." workaround worked :(
And I don't think I need to URLquote.
TIA,
Tony


-Original Message-
From: Chris Withers <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 11:05 am
Subject: Re: [Zope] How Do I "Structure" This?



Ah Tony,?
?
looks like the penny is yet to drop...?
?
[EMAIL PROTECTED] wrote:?
> Bummer. Well, I'm trying to call a script that will render content to the 
> Web, like this:?
> ?
?
My guess is that what you're _really_ trying to do here is:?
?
?
?
...but next you'll be wondering how to url quote x.?
?
I feel we're fighting a loosing battle here...?
?
Chris?
?
-- Simplistix - Content Management, Zope & Python Consulting?
? - http://www.simplistix.co.uk?



AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread tonylabarbara

Well, I'm trying to do the following:

1) generate a list of variables using tal:define

2) pass those variables to a script, that will then make a few edits and render 
everything as an HTML page.



I'm doing this as a work-around to the problem I posted earlier, that nobody 
apparently could solve, called "Form-Through-Script", where I was trying to 
call a script using a form action but couldn't pass the page as a variable. 
Well, I can pass variables and reconstruct the page, but then I have the 
problem of missing "structure".



Conversely, it could pass those variables to a page that would then render, but 
how to pass them and render the page? 



There has GOT to be a way to work around this!

TIA,

Tony


-Original Message-
From: Doyon, Jean-Francois <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 10:50 am
Subject: RE: [Zope] How Do I "Structure" This?




Why would you put HTML inside an HREF?

?

Sounds to me like you want  or something like that.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: August 15, 2007 10:45
To: [EMAIL PROTECTED]; zope@zope.org
Subject: Re: [Zope] How Do I "Structure" This?




Bummer. Well, I'm trying to call a script that will render content to the Web, 
like this:

which calls a script that does this:
return "" + x + ""
but of course it delivers this to the browser:
<html><body>x</body></html>
Any way to work around this problem?
TIA,
Tony


-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 10:20 am
Subject: Re: [Zope] How Do I "Structure" This?



--On 15. August 2007 10:17:56 -0400 [EMAIL PROTECTED] wrote:?
?
> Hi;?
> I have the following PT code:?
> ?
> and I want to "structure" it, kind of like this:?
> ?
> How do I do that??
?
As documented, 'structure' only works with tal:content|replace.?
?
-aj?


AOL now offers free email to everyone. Find out more about what's free from AOL 
at AOL.com.




AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Andreas Jung



--On 15. August 2007 16:05:13 +0100 Chris Withers <[EMAIL PROTECTED]> 
wrote:



Ah Tony,

looks like the penny is yet to drop...

[EMAIL PROTECTED] wrote:

Bummer. Well, I'm trying to call a script that will render content to
the Web, like this: 


My guess is that what you're _really_ trying to do here is:



...but next you'll be wondering how to url quote x.



By using the well-know url_quote() or url_quote_plus() methods.

-aj

pgpkThXs92yqj.pgp
Description: PGP signature
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Chris Withers

Ah Tony,

looks like the penny is yet to drop...

[EMAIL PROTECTED] wrote:

Bummer. Well, I'm trying to call a script that will render content to the Web, 
like this:



My guess is that what you're _really_ trying to do here is:



...but next you'll be wondering how to url quote x.

I feel we're fighting a loosing battle here...

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
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 )


RE: [Zope] How Do I "Structure" This?

2007-08-15 Thread Doyon, Jean-Francois
Why would you put HTML inside an HREF?
 
Sounds to me like you want  or something like that.



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: August 15, 2007 10:45
To: [EMAIL PROTECTED]; zope@zope.org
Subject: Re: [Zope] How Do I "Structure" This?


Bummer. Well, I'm trying to call a script that will render content to
the Web, like this:

which calls a script that does this:
return "" + x + ""
but of course it delivers this to the browser:
<html><body>x</body></html>
Any way to work around this problem?
TIA,
Tony


-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 10:20 am
Subject: Re: [Zope] How Do I "Structure" This?



--On 15. August 2007 10:17:56 -0400 [EMAIL PROTECTED] wrote: 
 
> Hi; 
> I have the following PT code: 
>  
> and I want to "structure" it, kind of like this: 
>  
> How do I do that? 
 
As documented, 'structure' only works with tal:content|replace. 
 
-aj 



AOL now offers free email to everyone. Find out more about what's free
from AOL at AOL.com <http://www.aol.com?ncid=AOLAOF0002000437> .

___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread tonylabarbara
Bummer. Well, I'm trying to call a script that will render content to the Web, 
like this:

which calls a script that does this:
return "" + x + ""
but of course it delivers this to the browser:
<html><body>x</body></html>
Any way to work around this problem?
TIA,
Tony


-Original Message-
From: Andreas Jung <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]; zope@zope.org
Sent: Wed, 15 Aug 2007 10:20 am
Subject: Re: [Zope] How Do I "Structure" This?


?
--On 15. August 2007 10:17:56 -0400 [EMAIL PROTECTED] wrote:?
?
> Hi;?
> I have the following PT code:?
> ?
> and I want to "structure" it, kind of like this:?
> ?
> How do I do that??
?
As documented, 'structure' only works with tal:content|replace.?
?
-aj?



AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
___
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 )


Re: [Zope] How Do I "Structure" This?

2007-08-15 Thread Andreas Jung



--On 15. August 2007 10:17:56 -0400 [EMAIL PROTECTED] wrote:


Hi;
I have the following PT code:

and I want to "structure" it, kind of like this:

How do I do that?


As documented, 'structure' only works with tal:content|replace.

-aj

pgpsCETyUYRGJ.pgp
Description: PGP signature
___
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 )


[Zope] How Do I "Structure" This?

2007-08-15 Thread tonylabarbara
Hi;
I have the following PT code:

and I want to "structure" it, kind of like this:

How do I do that?
TIA,
Tony

AOL now offers free email to everyone.  Find out more about what's free from 
AOL at AOL.com.
___
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 )