-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View in subfolder #845
Comments
You can do it like this:
Take a look at /application/core/View.php ::render() to see how it works. |
Yeah. that part is done and works fine. But how can I get the url to be for example URL/medicines/medicine1/forms/male ? Whereas medicines are controller and medicine one is an action but I would need to have 2 actions then? Because if I render the view like you said, I dont get any errors, but the page will still be URL/medicines/medicine1. Any help appreciated! |
BUMP! |
I'm not sure if I get your problem: You control the URL with the name and the given variables in the controller. So you can have a function like
If
I'm not sure if that is very pretty, but should work. |
@raqulka Does that solve your problem? |
I really like this starting template but would like to extend it a little or ask for guidance.
I would like to have a view in subfolder so the structure would look like this:
views
--medicines
----medicine1
----info.php
------forms
--------male.php
--------female.php
----medicine2
----info.php
------forms
--------male.php
--------female.php
----medicine3
----info.php
------forms
--------male.php
--------female.php
Is this something easy to implement or would it require a lot of work?
The text was updated successfully, but these errors were encountered: