sposch wrote: great idea
typos:
"unavaible" -> "unavailable"
"custom the language of your pages" -> "customIZE the language of your pages"
A solution can be to use several domains :
* http://my-app.com for the frontend
* http://my-app-backend.com for the backend
Personnaly, I prefer use some sub domains for each application :
* http://my-app.com for the frontend
* http://admin.my-app.com for the backend
alecs wrote: @benhaines
English is not my native english, but, from what i have learned in school, I reember that is "a car" and "an apple" ...
i think it should be "AN ui"...
Quote: wrote:
Optimize your routes
The symfony routing system is one of the killer features of the framework.
- Code: Select all
<p>Please have a look on <?php echo link_to('our products', 'product/index') ?>.</p>
Indicate in your template which `module/action` you want and then let `routing.yml` do all the job.
You can use the default rule:
- Code: Select all
default:
url: /:module/:action/*
Or add a dedicated one:
- Code: Select all
product_list:
url: /our-products
param: { module: product, action: index }
Clear your cache and all the related links and uri will be modified, all over the application.
It feels like magic, but it has a cost.
Each time the url request `product/index` is found in a template, symfony has to scan all the rules defined in `routing.yml` and guess which one can handle this request.
The default rule ? An other one ?
This search is done for all the links...
If your project have many pages and many routing rules, you can speed up your application by using rule labels instead of a module/action pairs in your templates:
- Code: Select all
<p>Please have a look on <?php echo link_to('our products', '@product_list') ?>.</p>
This solution will speed up the routing, but the disadvantage is that internal links become less self-evident.
It's up to you.
Read the related symfony documentation
Users browsing this forum: No registered users and 0 guests