Re: al-if question
Gabriel Cooper <[email protected]> Thu, 28 Jul 2005 09:32:26 -0400
| Newsgroups | gmane.comp.web.albatross.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1653455460==
Content-Type: multipart/alternative;
boundary="------------010305020405050304010703"
This is a multi-part message in MIME format.
--------------010305020405050304010703
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
<al-value expr="locals().get('blah','Blah does not exist!')"/>
<al-if expr="locals().get('blah',False)"/>
Blah Exists
<al-else>
Blah Doesn't Exist
</al-if>
Axel Steiner wrote:
>Hi,
>
>this may be a stupid question, but I'm new to Albatross
>and didn't find a solution in the documenation. How
>can check with al-if, wether a variable is defined or not?
>When I try a <al-if expr="bla"> and bla is not defined I
>get an error....NameError: name 'bla' is not defined
>But I need something like this, because the variable
>will be defined later.
>
>Thanks,
>Axel
>
>---
>"Unix is very user-friendly. It's just picky who its friends are."
>
>PGP-Fingerprint: D7B2 2A64 CCCB 9253 5474 E5F8 5B4B 8FD9 CA6E B770
>_______________________________________________
>Albatross-users mailing list
>[email protected]
>https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users
>
>
>
--
__________________________________
*gabriel.cooper*@mediapulse.com <mailto:[email protected]>
internet developer
865.675.4455 x32
800.380.4514
www.mediapulse.com <http://www.mediapulse.com/>
__________________________________
--------------010305020405050304010703
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<al-value expr="locals().get('blah','Blah does not exist!')"/><br>
<br>
<al-if expr="locals().get('blah',False)"/><br>
Blah Exists<br>
<al-else><br>
Blah Doesn't Exist<br>
</al-if><br>
<br>
Axel Steiner wrote:
<blockquote cite="[email protected]"
type="cite">
<pre wrap="">Hi,
this may be a stupid question, but I'm new to Albatross
and didn't find a solution in the documenation. How
can check with al-if, wether a variable is defined or not?
When I try a <al-if expr="bla"> and bla is not defined I
get an error....NameError: name 'bla' is not defined
But I need something like this, because the variable
will be defined later.
Thanks,
Axel
---
"Unix is very user-friendly. It's just picky who its friends are."
PGP-Fingerprint: D7B2 2A64 CCCB 9253 5474 E5F8 5B4B 8FD9 CA6E B770
_______________________________________________
Albatross-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users">https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users</a>
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font color="#999999">__________________________________ </font>
<p> <a class="address" style="text-decoration: none;"
href="mailto:[email protected]"><font font=""
color="#000000" face="Myriad Pro, Arial, Helvetica, sans-serif"
size="2"><b>gabriel.cooper</b></font><font color="#808080"
face="Myriad Pro, Arial, Helvetica, sans-serif" size="2">@mediapulse.com</font></a><br>
<font color="#808080" face="Myriad Pro, Arial, Helvetica, sans-serif"
size="2"> internet developer<br>
865.675.4455 x32<br>
800.380.4514</font> </p>
<p><a class="address" style="text-decoration: none;"
href="http://www.mediapulse.com/"><font color="#a51c1e"
face="Myriad Pro, Arial, Helvetica, sans-serif" size="2">www.mediapulse.com</font></a><br>
<font color="#999999">__________________________________</font></p>
</div>
</body>
</html>
--------------010305020405050304010703--
--===============1653455460==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Albatross-users mailing list
[email protected]
https://www.object-craft.com.au/cgi-bin/mailman/listinfo/albatross-users
--===============1653455460==--