I started learning cakephp2 and was following the basic tutorial. But I find most of the tutorials out there complicated and hard to understand. I want to a make a simple site that allows the user to transition to the item page from shop list page. I want the url to display like (sample.com/shoplist/items).maybe I'm having trouble with Controller. It would be great help if a simple there are some simple sample. I would love to hear from you.
Unable to create desired url in cakephp2
34 Views Asked by Jennifer At
1
There are 1 best solutions below
Related Questions in CAKEPHP-2.0
- fetching result from database in specific format cakephp5
- CakePHP AJAX Response from Controller to View
- Fatal error: Uncaught FatalErrorException: [MissingHelperException] Helper class FormHelper could not be found cake php 2.x
- Can we limit parent in generateTreeList function?
- MY SQL listing all the parent and childrens nodes with a JOIN in MY SQL 5.7
- Cakephp2 https redirects on AWS ECS
- facing issues with my CakePHP 2 application not loading the webroot
- CakePHP session and cache handling
- Delete multiple rows from DB with Vue Js and CakePHP
- How can I include the user ID in the filename of my tmp sessions in CakePHP 2.x?
- How do I upgrade version of cakephp2.0 to cakephp3 and cakephp4 step by step?
- CakePHP 2.x: working with an existing database that does not follow the naming conventions
- To log the queries in cake php2 without setting the debug =2
- cakephp error Call to a member function where() on array
- Cakephp2.0 URL ID can be changed to user make it so its not allowed
Related Questions in CAKEPHP-2.3
- how to display a message if database table is empty in cakephp
- Cakephp Find all WHERE in two categories
- Cakephp link to view a page in sub folder
- CakePHP HABTM Select box in edit mode not populating
- view($id) Method is being called instead of index() Method with GET VERB [CakePHP]
- CakePHP deep (multiple related models) validation?
- PHP Sort Varchar Data Array In Ascending Order
- Why we use escape => false in cakephp
- Delete multiple rows by ticking Checkbox
- Separating admin login & member login in CakePHP ACL
- Cakephp After delete all
- CakePHP AuthComponent not ridirecting properly on Chrome
- cakephp binding model through another table
- $this->Html->css with inline=false doesn't work
- CakePHP flash messages not getting removed from session
Related Questions in CAKEPHP-2.4
- CakePHP 2.4 CakeEmail ignores from() configuration
- mail() function is not working in cakephp 2
- Cake PHP 2 save data via model in Event Listener
- How to create a dummy Controller in Command Shell pass to Component CakePHP 2.4.3
- Cache engine search is not properly configured Cakephp 2.4.3
- CakePHP 2.4 fetch 10 records per event in single Select query
- Set foreign column to NULL when related row is deleted
- Cakephp 2.4 on PHP 7.3
- Pseudolocalization in CakePHP/2
- Unable to create desired url in cakephp2
- CakePHP: how to make a submit button with link, which stores the request data
- Database does not have enough time to save the record
- cakephp 2.x delete not working
- CakePHP SaveAll filename
- Overriding route in Cakephp
Related Questions in CAKEPHP-2.5
- Missing Database Table Error: Database table supports for model Support was not found
- Upload images in Cakephp old framework
- How to fix mocking auth error in cakephp 2 and phpunit4 up?
- I am throwing exception in Cakephp 2.5 from a condition, using PHP 7.2, it throwing nothing, why?
- How to display a stored session list of posts in index.ctp in CAKEPHP 2.10.15
- How to get list of failed invoices of a customer in STRIPE API?
- Cakephp2 column comparison in where clause
- MPDF7 not displaying PDF
- Call to undefined method PaginatorComponent::paginate() cakephp2
- Getting null when using getLastInsertID in cakephp2.10
- Ajax/cakephp 2. Click into one checkbox, and populate two different select boxes
- CakePhp 2.5 $belongsTo in two models
- Model data in schema create with custom connection
- Process post action with another action within controller
- Constant CAKE_CORE_INCLUDE_PATH already defined CakePHP
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you consider the usual use of the framework, you have:
domain/controller/actionas the URL. CakePHP will look for aViewfile with the same name as theactionto show on the window.So, one way to accomplish what you've discussed, would be to have a
controllernamedShoplistController.phpwhere you can haveindexas the action for the main View, which should be calledindex.ctp.Then, when the user wants to look at items, these could happen with an action called
items, which would demand the View fileitems.ctp.However, it's important to note that while working with CakePHP (And other MVC frameworks), it's best to organize Models, Controllers, and Views based on their actual jobs and responsibilities, not the URL they build.
It's also important to note that the suggestions I'm providing here assume everything is in the right place:
Controllerfile in theapp/Controllerdirectory andViewsin theapp/View/Shoplistdirectory.