URL Routing
Permalinkhttp://www.concrete5.org/marketplace/addons/url-director/...
I wrote this for this in mind.
How did you figure it out? I'm trying to do the same thing with Backbone.
Thank you in advance.
For a single_page, the controller would be in /controllers/your-page-handle.php
For a user-created page, you need a controller for a specific page type. Let's say you have a pagetype with the handle "blog_post", then you would create this folder:
/controllers/page_types/
...and inside that folder put a file called "blog_post.php". Inside that file would be something like this:
<?php defined('C5_EXECUTE') or die("Access Denied."); class BlogPostPageTypeController extends Controller { public function view($first_querystring_arg = null, $second_querystring_arg = null) { //do something here with the querystring args, then send data to the page type template via $this->set('variable_name', $value); } }
If this is a "single_page", check out this boilerplate code I have for dashboard CRUD interfaces:https://github.com/jordanlev/c5_boilerplate_crud...
Hope that helps!
-Jordan
Thank you for your help, but, what do you mean with single_page and
user-created
page? what's the difference between them?
Thank you
----------------------------------------------
Atentamente/Best regards
Rafael Mora
Cel/Mob: +58-414-493.31.39
BB Pin: 79F583A5
Twitter @titanve. I'm also on Telegram and Whatsapp
Best regards
----------------------------------------------
Atentamente/Best regards
Rafael Mora
Cel/Mob: +58-414-493.31.39
BB Pin: 79F583A5
Twitter @titanve. I'm also on Telegram and Whatsapp
A fairly roundabout way, but I'm not if what you want to do is possible.
Job.