コード例 #1
0
 public function view()
 {
     $id = $this->request->params['id'];
     $api = mpapiComponent::getApi()->Kultura();
     $index = $api->getIndex($id);
     $this->set('index', $index);
 }
コード例 #2
0
 function dataset()
 {
     $dataset = $this->request->params['dataset'];
     $page = $this->request->params['page'];
     $api = mpapiComponent::getApi()->Dane();
     $map = $api->getDatasetMap($dataset, $page);
     $urlset = array('xmlns:' => 'http://www.sitemaps.org/schemas/sitemap/0.9', 'url' => array());
     foreach ($map as $item) {
         $loc = 'http://' . PORTAL_DOMAIN . '/dane/' . $dataset . '/' . $item['id'];
         if ($item['slug']) {
             $loc .= ',' . $item['slug'];
         }
         $urlset['url'][] = array('loc' => $loc, 'changefreq' => 'daily', 'priority' => $item['weight']);
     }
     $this->set('data', $urlset['url']);
     Configure::write('debug', 0);
 }