Commit dde8e67e58c92f9fb4571710dbdb1b9974086e90
1 parent
62ffca64
sitemap controller fix noindex
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
console/controllers/SiteMapController.php
... | ... | @@ -144,26 +144,31 @@ class SiteMapController extends Controller |
144 | 144 | |
145 | 145 | $content = '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; |
146 | 146 | |
147 | + //home page + home catalog | |
147 | 148 | foreach ($this->getAddStatic() as $page) { |
148 | 149 | $this->createRow($page , 1,$content); |
149 | 150 | } |
150 | 151 | |
152 | + //static pages (contacts, about, etc) | |
151 | 153 | foreach ($this->getStaticPages() as $page) { |
152 | 154 | $url = Url::to(['text/index','translit' => $page->translit]); |
153 | 155 | $this->createRow($url , 1,$content); |
154 | 156 | } |
155 | 157 | |
158 | + //categories | |
156 | 159 | foreach ($this->getCategories() as $category) { |
157 | 160 | $url = Url::to(['catalog/category', 'category' => $category]); |
158 | 161 | $this->createRow($url , 1,$content); |
159 | 162 | } |
160 | 163 | |
164 | + //products | |
161 | 165 | foreach ($this->getProducts() as $product) { |
162 | 166 | |
163 | 167 | $url = Url::to(['catalog/product', 'product' => $product]); |
164 | 168 | $this->createRow($url , 0.9, $content); |
165 | 169 | } |
166 | 170 | |
171 | + //articles | |
167 | 172 | foreach ($this->getArticles() as $article) { |
168 | 173 | |
169 | 174 | $url = Url::to(['articles/show', 'translit' => $article->translit, 'id' => $article->id,]); | ... | ... |