Re: [Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
On Tue, Oct 5, 2010 at 10:42 AM, Andrew Milton wrote:

> +---[ Mark Phillips ]--
> |
> |
> | On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton 
> wrote:
> |
> | +---[ Mark Phillips ]--
> | | I have a table and I am putting data into the cells using tal. I
> want to bold the data under a certain condition. I tried
> | this,
> | | but it didn't work:
> | |
> | |  tal:condition="python:str(player['name']) == 'Team'">name
> |
> | Try using css
> |
> |  | />
> |
> |
> | Is CSS preferred over using tal:omit for some reason? When would I use
> tal:omit to add formatting to a table cell and when should
> | I use CSS instead?
>
> I think you want to use CSS. Later if you want to change from bold to
> underlined or italics or rainbow, you can just change a CSS class,
> instead of rebuilding your mark up.
>
> Thanks! good advice!
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Mark Phillips ]--
| 
| 
| On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton  
wrote:
| 
| +---[ Mark Phillips ]--
| | I have a table and I am putting data into the cells using tal. I want 
to bold the data under a certain condition. I tried
| this,
| | but it didn't work:
| |
| | name
| 
| Try using css
| 
| 
| 
| 
| Is CSS preferred over using tal:omit for some reason? When would I use 
tal:omit to add formatting to a table cell and when should
| I use CSS instead?

I think you want to use CSS. Later if you want to change from bold to
underlined or italics or rainbow, you can just change a CSS class,
instead of rebuilding your mark up.

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton wrote:

> +---[ Mark Phillips ]--
> | I have a table and I am putting data into the cells using tal. I want to
> bold the data under a certain condition. I tried this,
> | but it didn't work:
> |
> |  tal:condition="python:str(player['name']) == 'Team'">name
>
> Try using css
>
> 
>

Is CSS preferred over using tal:omit for some reason? When would I use
tal:omit to add formatting to a table cell and when should I use CSS
instead?
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Andrew Milton ]--
| +---[ Mark Phillips ]--
| | I have a table and I am putting data into the cells using tal. I want to 
bold the data under a certain condition. I tried this,
| | but it didn't work:
| | 
| | name
| 
| Try using css
| 
| 

s/tal:replace/tal:content/

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Mark Phillips ]--
| I have a table and I am putting data into the cells using tal. I want to bold 
the data under a certain condition. I tried this,
| but it didn't work:
| 
| name

Try using css





-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Chris Withers
On 05/10/2010 18:20, Mark Phillips wrote:
> I have a table and I am putting data into the cells using tal. I want to
> bold the data under a certain condition. I tried this, but it didn't work:
>
>  tal:condition="python:str(player['name']) == 'Team'">name
>
> The data (player/name) appears correctly, but when player/name='Team',
> the text is not bold. After some reading, I believe what is happening is
> that the tal:content tag is replacing everything between the  and
> the  tags. Is this correct? I tried this, and no bold either:
>
> GP

GP

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/05/2010 01:20 PM, Mark Phillips wrote:
> I have a table and I am putting data into the cells using tal. I want to
> bold the data under a certain condition. I tried this, but it didn't work:
> 
>  tal:condition="python:str(player['name']) == 'Team'">name
> 
> The data (player/name) appears correctly, but when player/name='Team', the
> text is not bold. After some reading, I believe what is happening is that
> the tal:content tag is replacing everything between the  and the 
> tags. Is this correct? I tried this, and no bold either:
> 
> GP
> 
> which supports my hypothesis about the tal:content tag.
> 
> How do I add some "conditional bold effect" in my table data?

You are correct that 'tal:content' on a wrapper element replaces any
markup in the children.  You want to use 'tal:content' on the 'b' tag
itself, and then 'tal:omit-tag' to drop the element (but not its
contents).  See:

http://wiki.zope.org/ZPT/TALSpecification14#omit-tag


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyrX78ACgkQ+gerLs4ltQ4tRQCfU0DN0AVeBSRg/wYjYFGcbAJL
8pUAn3x/KD8/qXdp4acpcIluuVnWvtrv
=l0+r
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
I have a table and I am putting data into the cells using tal. I want to
bold the data under a certain condition. I tried this, but it didn't work:

name

The data (player/name) appears correctly, but when player/name='Team', the
text is not bold. After some reading, I believe what is happening is that
the tal:content tag is replacing everything between the  and the 
tags. Is this correct? I tried this, and no bold either:

GP

which supports my hypothesis about the tal:content tag.

How do I add some "conditional bold effect" in my table data?

Mark
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )