mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 10:52:11 +00:00
Reworked routing for future usage with caching
This commit is contained in:
parent
5d522a2064
commit
0bf98c2bf1
@ -1,19 +1,31 @@
|
||||
{
|
||||
"routes": {
|
||||
"route_name": {
|
||||
"index": {
|
||||
"path": "/",
|
||||
"controller": "\\Index\\Controller\\IndexController",
|
||||
"function": "index"
|
||||
},
|
||||
"route_name2": {
|
||||
"path": "/test/{slug}/",
|
||||
"controller": "\\Index\\Controller\\IndexController",
|
||||
"function": "test",
|
||||
"css": {
|
||||
"path": "/style.css",
|
||||
"file": "/css/style.css",
|
||||
"type": "text/css",
|
||||
"headers": {
|
||||
"Content-Type": "text/css"
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"path": "/{arg}/{arg2}",
|
||||
"controller": "\\ModuleName\\Controller\\ExampleController",
|
||||
"function": "example",
|
||||
"args": {
|
||||
"slug": {
|
||||
"arg": {
|
||||
"regex": "/[a-z]+/"
|
||||
},
|
||||
"arg2": {
|
||||
"option": "test.option"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"templateFolder": "/Templates/"
|
||||
}
|
||||
|
@ -1,8 +1,18 @@
|
||||
{
|
||||
"routes": {
|
||||
"route_name": {
|
||||
"path": "/example/test-{arg}",
|
||||
"controller": "\\AdminPanel\\Modules\\ModuleName\\Controller\\ExampleController",
|
||||
"example_route": {
|
||||
"path": "/example",
|
||||
"controller": "\\ModuleName\\Controller\\ExampleController",
|
||||
"function": "index"
|
||||
},
|
||||
"loggedIn": {
|
||||
"path":"/example/is-logged",
|
||||
"controller":"\\ModuleName\\Controller\\ExampleController",
|
||||
"function": "isLoggedIn"
|
||||
},
|
||||
"example_route_with_arg": {
|
||||
"path": "/example/{arg}",
|
||||
"controller": "\\ModuleName\\Controller\\ExampleController",
|
||||
"function": "example",
|
||||
"args": {
|
||||
"arg": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user