Re: HtmlHelper::div close tag?

2012-02-21 Thread Tilen Majerle
i'm using like this for start tag $this-Html-useTag('tagstart', 'div', array(html options here)); for end tag $this-Html-useTag('tagend', 'div'); -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/21 Perry perry...@gmail.com thanks for the reply, I have many elements to be wrapped, and

Re: HtmlHelper::div close tag?

2012-02-21 Thread jeremyharris
The reason is because $text is empty. HtmlHelper::div uses HtmlHelper::tag which documents that it will only print the starting tag if no text is within the tag. I personally don't like this behavior. That's why you'll see things like this in baked code echo $this-Html-tag('div',

Re: HtmlHelper::div close tag?

2012-02-21 Thread Jeremy Burns | Class Outfit
I went down the whole Html-tag route once and then methodically went through and unpicked it; it just didn't make sense in 99.9% of all instances. Jeremy Burns Class Outfit http://www.classoutfit.com On 21 Feb 2012, at 15:16:09, jeremyharris wrote: The reason is because $text is empty.

Re: HtmlHelper::div close tag?

2012-02-21 Thread Miles J
The only real use for generating HTML with the helper is when you are packaging markup from within a helper. Just manually write it in the view. On Feb 21, 7:20 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: I went down the whole Html-tag route once and then methodically went

HtmlHelper::div close tag?

2012-02-20 Thread Perry
Hi guys, I want to wrap some elements in a div, and I'm using $this-Html-div('foo') to generate the starting div tag, but I can't find a method to generate the closing tag how can I use the HtmlHelper to do this? I think write the '/div' directly is ugly... -- Perry | 彭琪 http://pengqi.me

Re: HtmlHelper::div close tag?

2012-02-20 Thread Greg Skerman
I always find leaving the markup in its native language is beneficial, except in cases where cake's pathing becomes an issue (image, anchors etc)... I'd go and write divfoo/div personally, but thats just me. however, from the documentation: HtmlHelper::div(*string $class*, *string $text*,

Re: HtmlHelper::div close tag?

2012-02-20 Thread Perry
thanks for the reply, I have many elements to be wrapped, and I'm using the HtmlHelper to generate these nested elements too, so I cant' pass these elements as the second parameter maybe I should write the layout directly On Tue, Feb 21, 2012 at 2:36 PM, Greg Skerman gsker...@gmail.com wrote: