It looks like you want to use the functionality from the sitemap.php file in your cakephp application. The bidding method to include this in cakephp is to configure it as a provider. Follow these steps:
1- /.
2- ( ), :
App::import('Vendor','sitemap');
, , PHP. , , show_links(), , , vendor/sitemap, :
show_links();
, , :
App::import('Vendor','sitemap');
$sitemap = new Sitemap;
$sitemap->show_links();
, sitemap config/routes.php:
Router::connect('/sitemap.xml', array('controller' => 'YOUR_CONTROLLER', 'action' => 'YOUR_ACTION'));
, , sitemap.php.
, , - :
<?php
class SiteMapController extends AppController
{
var $name = 'Tests';
function show_map()
{
App::import('Vendor','sitemap');
$sitemap = new Sitemap;
$sitemap->show_links();
}
}
?>
config/routes.php :
Router::connect('/sitemap.xml', array('controller' => 'site_maps', 'action' => 'show_map'));
, URL-:
http:
:
http:
: http://book.cakephp.org/view/542/Defining-Routes
!
!