Display site map action
546000
public function displayAction($display = 'html')
    {
        $site   = $this->get('ucms_site.manager')->getContext();
        $menus  = $this->get('umenu.menu_storage')->loadWithConditions(['site_id' => $site->getId()]);

        if ('xml' === $display) {
            return $this->displayXML($menus);
        }

        return $this->displayHTML($menus);
    }
167224
def render
      xml = Builder::XmlMarkup.new(:indent => 2)
      xml.instruct!(:xml, :version => '1.0', :encoding => 'UTF-8')
      xml.sitemapindex(XmlSitemap::INDEX_SCHEMA_OPTIONS) { |s|
        @maps.each do |item|
          s.sitemap do |m|
            m.loc        item[:loc]
            m.lastmod    item[:lastmod]
          end
        end
      }.to_s
    end
116065
public function indexAction()
    {
        $searchService = $this->get( "ezpublish.api.repository" )->getSearchService();
        $query         = $this->getQuery();
        $query->limit  = 0;
        $resultCount   = $searchService->findLocations( $query )->totalCount;

        // Dom Doc
        $sitemap               = new DOMDocument( "1.0", "UTF-8" );
        $sitemap->formatOutput = true;

        // create an index if we are greater than th PACKET_MAX
        if ( $resultCount > static::PACKET_MAX )
        {
            $root = $sitemap->createElement( "sitemapindex" );
            $root->setAttribute( "xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9" );
            $sitemap->appendChild( $root );

            $this->fillSitemapIndex( $sitemap, $resultCount, $root );

            return new Response( $sitemap->saveXML(), 200, [ "Content-type" => "text/xml" ] );
        }

        // if we are less or equal than the PACKET_SIZE, redo the search with no limit and list directly the urlmap
        $query->limit = $resultCount;
        $results      = $searchService->findLocations( $query );
        $root         = $sitemap->createElement( "urlset" );
        $root->setAttribute( "xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9" );
        $this->fillSitemap( $sitemap, $root, $results );
        $sitemap->appendChild( $root );

        $response = new Response( $sitemap->saveXML(), 200, [ "Content-type" => "text/xml" ] );
        $response->setSharedMaxAge( 24 * 3600 );

        return $response;
    }
65628
function ReportSiteAction(Site $site, Enums\Action $action)
    {
        $logItem = $this->CreateLogItem(Enums\ObjectType::Site(), $action);       
        if (!$action->Equals(Enums\Action::Delete()))
        {
            $logSite = new LogSite();
            $logSite->SetLogItem($logItem);
            $logSite->SetSite($site);
            $logSite->Save();
        }
    }
855172
def list_actions():
    """"""
    for name, action in _current_actions.items():
        click.echo('{0}:{1}'.format(
            name, '*' if hasattr(action, 'argument') else ''
        ))
1094203
def get_action(args):
    """"""
    redirect_mode = args.bang or args.search or args.lucky
    if redirect_mode and not args.url:
        return webbrowser.open_new_tab
    else:
        return print_result
326261
def showActionOrigins(self, actionSetHandle, ulActionHandle):
        """"""

        fn = self.function_table.showActionOrigins
        result = fn(actionSetHandle, ulActionHandle)
        return result
1009980
public function indexAction() {
        $this->_title($this->__('System'))
            ->_title(Mage::helper('turpentine')->__('Varnish Management'));
        $this->loadLayout()
            ->_setActiveMenu('system/turpentine')
            ->_addContent($this->getLayout()
                ->createBlock('turpentine/management'))
            ->renderLayout();
    }
912903
function publishSiteMaps () {
    var path = 'sitemap.xml';

    return publishRobotsTxt ()
        .then(function () {
            return fs.statAsync(path);
        })
        .then(function (pStat) {
            if (pStat.isFile()) {
                // file exists; throw Error to proceed with creating of sitemaps for posts and tags
                return publishPostsSiteMap()
                    .then(function () {
                        return publishTagsSiteMap();
                    })
                    .catch(log.error);
            }
            else {
                // create sitemap.xml file
                throw new Error();
            }
        })
        .catch(function () {
            var sitemap = sm.createSitemap ({
                hostname: config.siteUrl,
                cacheTime: 600000,        // 600 sec - cache purge period
                urls: [{
                        url: '/sitemap-posts.xml',
                        changeFreq: 'weekly',
                        priority: 0.8,
                        lastmodrealtime: true
                    },
                    {
                        url: '/sitemap-tags.xml',
                        changeFreq: 'weekly',
                        priority: 0.8,
                        lastmodrealtime: true
                    }]
            });

            return fs
                .openAsync(path, 'w')
                .then(function () {
                    return fs
                        .writeFileAsync(path, sitemap.toString())
                        .then(function () {
                            // file exists; throw Error to proceed with creating of sitemaps for posts and tags
                            return publishPostsSiteMap().then(function () {
                                return publishTagsSiteMap().catch(log.error);
                            });
                        })
                        .catch(log.error);
                })
                .catch(log.error);
        });
}
1153694
public function addPageToSitemapIndex()
    {
        if (!$this->checkIfSitemapIndexingIsEnabled('page')) {
            return;
        }

        if (!$this->checkIfNoLanguageFallback()) {
            // got content in fallback language => don't index
            return;
        }

        $pageUrl = $this->getPageUrl();

        // check blacklisting
        if (GeneralUtility::checkUrlForBlacklisting($pageUrl, $this->blacklistConf)) {
            return;
        }

        // Index page
        $pageData = $this->generateSitemapPageData($pageUrl);
        if (!empty($pageData)) {
            SitemapUtility::index($pageData);
        }
    }
1068645
def start_output (self):
        """"""
        super(SitemapXmlLogger, self).start_output()
        self.xml_start_output()
        attrs = {u"xmlns": u"http://www.sitemaps.org/schemas/sitemap/0.9"}
        self.xml_starttag(u'urlset', attrs)
        self.flush()
376072
public function listAction()
    {
        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroots = [];
        foreach ($siterootManager->findAll() as $siteroot) {
            $siteroots[] = [
                'id' => $siteroot->getId(),
                'title' => $siteroot->getTitle(),
            ];
        }

        return new JsonResponse([
            'siteroots' => $siteroots,
            'count' => count($siteroots),
        ]);
    }
550113
public function detailsAction()
    {
        
        // Getting the Site config "MelisDemoCms.config.php"
        $siteConfig = $this->getServiceLocator()->get('config');
        $siteConfig = $siteConfig['site']['MelisDemoCms'];
        $siteDatas = $siteConfig['datas'];
        
        $dateMax = date("Y-m-d H:i:s", strtotime("now"));
		$listNewsPluginView = $this->MelisCmsNewsShowNewsPlugin();
		$listNewsParameters = array(
		    'id' => 'newsDetails',
		    'template_path' => 'MelisDemoCms/plugin/news-details',
		);
		// add generated view to children views for displaying it in the contact view
		$this->view->addChild($listNewsPluginView->render($listNewsParameters), 'newsDetails');
		
		/**
		 * Generating Homepage Latest News slider using MelisCmsNewsLatestNewsPlugin Plugin
		 */
		$latestNewsPluginView = $this->MelisCmsNewsLatestNewsPlugin();
		$latestNewsParameters = array(
		    'template_path' => 'MelisDemoCms/plugin/latest-news',
            'pageIdNews' => $siteDatas['news_details_page_id'],
		    'filter' => array(
		        'column' => 'cnews_publish_date',
		        'order' => 'DESC',
		        'limit' => 10,
		        'unpublish_filter' => true,
		        'date_max' => null,
		        'site_id' => $siteDatas['site_id'],
		    )
		);
		// add generated view to children views for displaying it in the contact view
		$this->view->addChild($latestNewsPluginView->render($latestNewsParameters), 'latestNews');
        
        $this->view->setVariable('renderMode', $this->renderMode);
        $this->view->setVariable('idPage', $this->idPage);
        return $this->view;
    }
1172196
def action_spatial(self, action):
    """"""
    if self.surf.surf_type & SurfType.FEATURE:
      return action.action_feature_layer
    elif self.surf.surf_type & SurfType.RGB:
      return action.action_render
    else:
      assert self.surf.surf_type & (SurfType.RGB | SurfType.FEATURE)
380442
function buildSitemapIndex (conf) {
  var xml = [];
  var lastmod;

  xml.push('<?xml version="1.0" encoding="UTF-8"?>');
  if (conf.xslUrl) {
    xml.push('<?xml-stylesheet type="text/xsl" href="' + conf.xslUrl + '"?>');
  }
  if (!conf.xmlNs) {
    xml.push('<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" ' +
      'xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" ' +
      'xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" ' +
      'xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">');
  } else {
    xml.push('<sitemapindex ' + conf.xmlNs + '>')
  }

  if (conf.lastmodISO) {
    lastmod = conf.lastmodISO;
  } else if (conf.lastmodrealtime) {
    lastmod = new Date().toISOString();
  } else if (conf.lastmod) {
    lastmod = new Date(conf.lastmod).toISOString();
  }


  conf.urls.forEach(url => {
    if (url instanceof Object) {
      lastmod = url.lastmod ? url.lastmod : lastmod;

      url = url.url;
    }
    xml.push('<sitemap>');
    xml.push('<loc>' + url + '</loc>');
    if (lastmod) {
      xml.push('<lastmod>' + lastmod + '</lastmod>');
    }
    xml.push('</sitemap>');
  });

  xml.push('</sitemapindex>');

  return xml.join('\n');
}
784703
def display_map(fname):
    
    print("viewing ", fname)
    
    wrld = read_map(fname)
    for row in wrld:
        #for col in row:
        print(row)
    app = gui_view_tk(None)
    app.add_file(fname)
    app.show_grid_from_file(fname)
    app.title('Map View')
    app.mainloop()
1160273
def toggleActions(self, value=True):
        """"""
        for z in self.actions.zoomActions:
            z.setEnabled(value)
        for action in self.actions.onLoadActive:
            action.setEnabled(value)