But using php to generate link is slower to render a page, because php has
to process the code unlike a html element. Of course it's not noticeable
unless under very high load.
Thank you,
-Alex Goretoy


On Sat, Sep 10, 2011 at 9:22 PM, Sam Sherlock <[email protected]>wrote:

> its a balance; the code you posted is readable and concise
>
> making links elements generally will add complexity to the simple and
> common (and varied task) of adding links
>
> when your link element has the ability to handle the various options it
> will be quite complex and the code will be less
> readable and also harder to adjust (the code to putput the link is going to
> be about the same). Plus it add no real advantage
>
> when you have a generic nature to a block of markup and vary parts within
> eg a piece of gallery content that contains a few divs  and a h3 and a link
> with and image
>
>  - S
>
>
>
>
>
> On 10 September 2011 13:12, elija <[email protected]> wrote:
>
>> I'm going through the blog tutorial and have found myself wondering
>> why
>>
>> <?php echo $this->Html->link($post['Post']['title'],
>> array('controller' => 'posts', 'action' => 'view', $post['Post']
>> ['id'])); ?>
>>
>> is better than writing an a element?
>>
>> --
>> Our newest site for the community: CakePHP Video Tutorials
>> http://tv.cakephp.org
>> Check out the new CakePHP Questions site http://ask.cakephp.org and help
>> others with their CakePHP related questions.
>>
>>
>> To unsubscribe from this group, send email to
>> [email protected] For more options, visit this group
>> at http://groups.google.com/group/cake-php
>>
>
>  --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to