scaffolding in subfolders not possible? |
[eluser]gunter[/eluser]
I am unable to do scaffolding in a subfolder controller so I think, it´s not possible... so it should be fixed or written in the user guide that it´s not available in subfolders... I am a little bit unsecure if I am right, because we have the subfolder feature since a year and I cannot beleave that I am the first one who have noticed that, so please can someone check if I am right? Maybe I made something wrong??? the first screen works: http://localhost/index.php/subfolder/con...ingtrigger but after clicking any link like edit/delete... we come to: http://localhost/index.php/subfolder/welcome/edit/3 instead of: http://localhost/index.php/subfolder/wel...ger/edit/3 I think the problem is in the Pagination.php line 62: Code: // Set the base URL that means, it grabs the controller name and the scaffolding trigger word and adds then /edit / delete and so on... it only takes care of the first 2 segments and there is no code in the case there is a segment more (the subfolder segment)... at least I doesn´t have seen anything like that am I right?
[eluser]Matthew Pennell[/eluser]
I think you're right - at least, I encountered the same problem trying to scaffold tables from within an /admin sub-controller.
[eluser]Rick Jolly[/eluser]
Yep, the problem has been brought up a few times - it should probably be noted in the documentation. There are a few possible fixes. Here is one: http://ellislab.com/forums/viewthread/53857/
[eluser]Derek Allard[/eluser]
If any of you have suggestions for how it should be worded, let me know and I'll endeavour to get something in there for you.
[eluser]sophistry[/eluser]
In the spirit of the pithy documentation: "You cannot use scaffolding in a controller that is located in a sub-folder."
[eluser]esra[/eluser]
[quote author="Derek Allard" date="1189726956"]If any of you have suggestions for how it should be worded, let me know and I'll endeavour to get something in there for you.[/quote] I would love to see the reaction in Rick's face when you add a note to the user guide to explain that one. It's less a bug than it is a coding slip. He simply forgot to update it when adding support for subfolders. It might make better sense to start a wiki section called bug fixes and place a modified version of Scaffolding in there with Pyro's solution.
[eluser]Michael Ekoka[/eluser]
I'm not sure if you need to scaffold from a sub-folder. Scaffolding is just a convenient way to manage data. Any controller would do. I chose to create a single controller just for that purpose. I tweaked it a little to be able to scaffold any db table directly from the url without having to go back in the code.
[eluser]Grahack[/eluser]
Hi, please could you share your tweak that allow to choose the table from the url? |
Welcome Guest, Not a member yet? Register Sign In |