When working in views, do you use HtmlHelper for html tags exclusively, or mix in raw html?
I always wondered how everyone else used HtmlHelper to handle html in
their views. I personally have been using a hybrid of raw html for
things like <p>, <div>, <ul>, etc because I find it easier to control
the flow of my page and see what's going on. I have been playing
around with HtmlHelper's native tag(), nestedList(), para(), and div()
functions and they let you do some really cool things, especially when
it concerns not repeating code.
My only problem with that is I have a harder time reading the code if
it is written using HtmlHelper only.
Here are some pastes for an example of what I mean:
Hybrid style:
http://bin.cakephp.org/view/42855264
HtmlHelper Style (using 1.2 syntax, sorry):
http://bin.cakephp.org/view/1487013872
I find that with the hybrid style it is much easier for me to
understand the final markup, but I like a lot of the features that
HtmlHelper offers. So my question is how do you guys do it in your
app's?
Thanks!@
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home