Commit 5953b4fa3199e0bc3ce1df92e638c35832ff1b33
1 parent
1e375ebe
паше на тест
Showing
4 changed files
with
19 additions
and
9 deletions
Show diff stats
frontend/microdata/MicrodataFabric.php
... | ... | @@ -29,7 +29,10 @@ class MicrodataFabric extends Microdata |
29 | 29 | return ($article==null)? |
30 | 30 | new OrganizationMicrodata(array_merge(self::getDefaultSettings())) |
31 | 31 | : |
32 | - new OrganizationMicrodata(array_merge($article,self::getDefaultSettings())); | |
32 | + #die(var_dump(self::getDefaultSettings())); | |
33 | + #die(var_dump(array_merge($article,self::getDefaultSettings()))); | |
34 | + new OrganizationMicrodata(array_merge($article, | |
35 | + self::getDefaultSettings())); | |
33 | 36 | } |
34 | 37 | |
35 | 38 | |
... | ... | @@ -38,7 +41,13 @@ class MicrodataFabric extends Microdata |
38 | 41 | |
39 | 42 | |
40 | 43 | protected static function getDefaultSettings(){ |
41 | - return require_once (realpath(__DIR__.'/settings/settings.php')); | |
44 | + return [ | |
45 | + 'context'=>"http://schema.org", | |
46 | + | |
47 | + ]; | |
48 | + | |
49 | + | |
50 | + | |
42 | 51 | } |
43 | 52 | |
44 | 53 | } |
45 | 54 | \ No newline at end of file | ... | ... |
frontend/microdata/OrganizationMicrodata.php
frontend/microdata/settings/settings.php
frontend/views/layouts/main.php
... | ... | @@ -192,7 +192,7 @@ $this->registerMetaTag( |
192 | 192 | <?php |
193 | 193 | if ($settings->logo != null){ |
194 | 194 | echo |
195 | - "<img itemprop='logo' src='/storage/logo/".$settings->logo."' alt='".\Yii::t('app','ABC short')."' | |
195 | + "<img src='/storage/logo/".$settings->logo."' alt='".\Yii::t('app','ABC short')."' | |
196 | 196 | title='".\Yii::t('app','ABC short')."' |
197 | 197 | >"; |
198 | 198 | }else{ |
... | ... | @@ -203,7 +203,6 @@ $this->registerMetaTag( |
203 | 203 | 'alt' => $settings->name, |
204 | 204 | #'alt'=>\Yii::t('app','ABC short'), |
205 | 205 | 'title'=>\Yii::t('app','ABC short'), |
206 | - 'itemprop'=>"logo" | |
207 | 206 | ] |
208 | 207 | ); |
209 | 208 | } |
... | ... | @@ -639,9 +638,9 @@ $this->registerMetaTag( |
639 | 638 | |
640 | 639 | $layoutMicrodata= |
641 | 640 | [ |
642 | - '@context'=> 'http://schema.org/', | |
643 | - '@type'=> 'Organization', | |
644 | - 'url'=>'http://www.your-company-site.com', | |
641 | + 'context'=> 'http://schema.org/', | |
642 | + 'type'=> 'Organization', | |
643 | + 'url'=>Url::home(true), | |
645 | 644 | #'logo'=>'http://www.example.com/logo.png', |
646 | 645 | 'logo'=>Url::home(true)."storage/logo/".$settings->logo, |
647 | 646 | 'contactPoint'=>[ | ... | ... |