Skip to content

Commit

Permalink
Migrate to new translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamek committed Mar 20, 2017
1 parent 965603a commit 059b389
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Dravencms/FrontModule/SeoModule/SitemapPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class SitemapPresenter extends BasePresenter

public function renderDefault()
{
$this->template->translationRepository = $this->entityManager->getRepository('Gedmo\Translatable\Entity\Translation');
$this->template->sitemap = $this->menuRepository->getSitemap();
}

Expand Down
7 changes: 3 additions & 4 deletions src/Dravencms/FrontModule/templates/Seo/Sitemap/default.latte
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<changefreq>always</changefreq>
<priority>{$url->getSitemapPriority()}</priority>
<loc>{link '//'.$url->getPresenter().':'.$url->getAction()}</loc>
{var $translations = $translationRepository->findTranslations($url)}
<xhtml:link n:foreach="$translations AS $locale => $translation"
<xhtml:link n:foreach="$url->getTranslations() AS $translation"
rel="alternate"
hreflang="{$locale}"
href="{link '//'.$url->getPresenter().':'.$url->getAction(), locale => $locale}"
hreflang="{$translation->getLocale()->getLanguageCode()}"
href="{link '//'.$url->getPresenter().':'.$url->getAction(), locale => $translation->getLocale()->getLanguageCode()}"
/>
</url>
</urlset>

0 comments on commit 059b389

Please sign in to comment.