Advanced Admin Routing in Cake


/ Published in: PHP
Save to your folder(s)

With this code you can pull all admin view files for a particular CakePHP controller in their own admin folder rather than renaming each file admin_whatever.

Line 779 in cake/libs/view/view.php


Copy this code and paste it in your HTML
  1. if(($routing_admin = Configure::read("Routing.admin")) !== null) {
  2. $name = str_replace($routing_admin.'_', $routing_admin.DS, $name);
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.