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 9158635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:17:41+00:00 2026-06-17T13:17:41+00:00

I have a small application. I have written some of the code in index.ctp

  • 0

I have a small application. I have written some of the code in index.ctp file and this file is working fine. Now I have added another function called add to my Controller file and also created a seperate file called add.ctp in Views folder.

My doubt is how to navigate to add.ctp file if I click a link. I want to create a menu in my main file and write a link so that when I click on that link the page must navigate to add() function.

My problem is:

  1. How to write href in cake php?
  2. What link do I provide? Controller or Views?
  • 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-17T13:17:42+00:00Added an answer on June 17, 2026 at 1:17 pm

    The manual would be a good place to start your CakePHP journey. Then you’d quickly notice it’s very easy to link to a controller action from your views with:

    echo $this->Html->link('Link text', array(
        'controller' => 'controller_name',
        'action' => 'add'
    ));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a small .net Windows Forms application. And now I decided to
I have written a small Python application where I use PyGame for displaying some
I have written a small web application but am missing some cool functionality. I
I have a small application written in PHP and a mysql database hosted on
We have a small daemon application written in C for a couple of various
I have a small command-line application written in C that acts as a wrapper/launcher
I've written up a small console utility. Throughout the application, I have used slf4j/log4j
I have a small application that uses WCF to communicate with a webserver. This
I have a small desktop Twitter client written in VB.NET (2.0). Works great. Some
I have a small application written in Play! which allows user registration and adding

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.