Yeah link() is good for setting it to a variable. But if you just need
a link on the page to direct somewhere, using url() is better imo. You
don't have to deal with Cakes over-zealous escaping and option
handling.

On Sep 15, 7:25 pm, "j.blotus" <[email protected]> wrote:
> @milesj
>
> I don't write my links like that, mainly because I like to assign my
> links to a variable, then stuff it into something else. In fact link()
> and image() are the only two function I probably would never stop
> using if not just from sheer habit. Thanks for chiming in though good
> insights.
>
> On Sep 15, 9:53 pm, Miles J <[email protected]> wrote:
>
> > I always hated that those functions were even in the HTML helper. It
> > brings up these questions, but in all seriousness, HTML should be
> > written as raw HTML.
>
> > I hate even using $html->link() this is far better.
>
> > <a href="<?php echo $this->Html->url(array()); ?>">Text</a>
>
> > On Sep 15, 3:04 pm, "j.blotus" <[email protected]> wrote:
>
> > > Those are some great points, and I didn't even think about performance
> > > issues and maintainability for people who don't know the syntax.
>
> > > On Sep 15, 5:06 pm, Jeremy Burns | Class Outfit
>
> > > <[email protected]> wrote:
> > > > I asked this very question a while back as I was having the same 
> > > > thoughts. I started down the path of using the helper everywhere but 
> > > > have backed out now and use pure HTML, except in the odd case. It has 
> > > > to be better from a performance point of view (why use a helper to 
> > > > generate a simple <p></p> block, for example), I find it easier to read 
> > > > and maintain and it makes the code just that bit more friendly for 
> > > > those who don't know Cake syntax.
>
> > > > Jeremy Burns
> > > > Class Outfit
>
> > > > [email protected]http://www.classoutfit.com
>
> > > > On 15 Sep 2010, at 22:01, j.blotus wrote:
>
> > > > > 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 
> > > > > sitehttp://cakeqs.organdhelpotherswith 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 [email protected]
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected] For more options, visit this 
> > > > > group athttp://groups.google.com/group/cake-php?hl=en

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 [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=en

Reply via email to