Which is what mine should do if I hadn't ommitted the actual link  
location. The bit of interest is the escape => false which stops the  
span from being escaped and showing as in your example

Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 19 Nov 2009, at 17:44, jburns <[email protected]> wrote:

> I agree it's cleaner. I hate to be picky, but by nesting the span
> inside the link the output is:
>
> <a href="/"><span class="welcome">Hello World</span></a> (in other
> words the <span> tag is visible in the output). Not sure if this is a
> limitation of $html->link?
>
> On Nov 19, 5:32 pm, mike karthauser <[email protected]> wrote:
>> On Thu, 2009-11-19 at 09:28 -0800, jburns wrote:
>>
>>> Or you could nest them...
>>
>>> echo $html->tag('span', $html->link('Hello World', '/'), array 
>>> ('class'
>>> => 'welcome'));
>>
>> you've actually got this the opposite of what was asked for.
>>
>> echo $html->link($html->tag('span','Hello
>> World',array('class'=>'welcome')),array('escape'=>false));
>>
>> far cleaner to add a class to the anchor and not bother with the span
>> though.
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected] 
> .
> For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl= 
> .
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to