Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:26:37+00:00 2026-06-06T18:26:37+00:00

Isn’t it much slower concerning development time ? What are the advantages of of

  • 0

Isn’t it much slower concerning development time ?

What are the advantages of of HTML->link ?

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:26:39+00:00Added an answer on June 6, 2026 at 6:26 pm

    It’s just a question of whether you want to generate your own URLs and hard-code them, or if you want Cake to do the work for you. For simple urls leading to the homepage of your site using cake may seem slower, but it’s actually useful for dynamic urls, for example:

    Say you’re printing a table of items and you have a link for each item that deletes that item. You can easily create this using:

        <?php
        echo $this->Html->link(
        'Delete',
        array('controller' => 'recipes', 'action' => 'delete', $id),
        array(),
        "Are you sure you wish to delete this recipe?"
    );
    

    Notice how using an array specifying the controller and action as a URL allows you to be agnostic of any custom routes. This can have its advantages.

    The corresponding way to do it without the HTML helper would be:

    <a href="/recipes/delete/<?php echo $id; ?>" onclick="return confirm('Are you sure you wish to delete this recipe?');">Delete</a>
    

    It can also be really useful for constructing URL query strings automatically. For example, you can do this in array format:

    <?php
    echo $this->Html->link('View image', array(
        'controller' => 'images',
        'action' => 'view',
        1,
        '?' => array('height' => 400, 'width' => 500))
    );
    

    That then outputs this line of HTML:

    <a href="/images/view/1?height=400&width=500">View image</a>
    

    It could be a pain to generate that URL manually.


    In summary, while it may seem awkward for simple links, the HTML helper definitely has its uses. For further uses, consult the cakePHP book on the HTML helper’s link function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Isn't the a:link pseudoclass redundant with a when put in that order (:link, :visited,
Isn't it much more elegant and neat to have an IStringable interface? Who needs
This isn't so much a programming issue, but i'm not sure where else to
Why isn't the jQuery changing the type attribute of #password_input to password? <html> <head>
Why isn't the function with fadeOut ever being reached? Every time the function runs
This isn't strictly a homework question, but an offshoot. How are time functions implemented
Why isn't this working in Chrome? HTML: <div class=deo id=a1> <form id=formaA1 name=formaA1> KOLIKO
Isn't having String enough? Just as an example, why can String class lets you
Isn't there another way of using global variables in a Java stlye manner in
Isn't there a Design Pattern who describes how to high cohesion? I need some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.