yiiSEO
YiiSEO has been completely refactored. It is lot more flexible and now you can make almost any SEO changes without changing your code.
Features :
Requirements : update your URLManager in /protected/config/main.php this way :
'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, ),
'modules'=>array( .... 'yiiseo'=>array( 'class'=>'application.modules.yiiseo.YiiseoModule', 'password'=>'111', // your default password is 111 ), ), 'components'=>array( .... 'seo'=>array( 'class' => 'application.modules.yiiseo.components.SeoExt', ), ), 'import'=>array( .... 'application.modules.yiiseo.models.*', ),
3.Run following line of code that suits you into your main layouts head :
`Yii::app()->seo->run();`
`Yii::app()->seo->run(Yii::app()->language);`
4.Run module by typing in the link : http://yoursite.com/yiiseo/
When you enter this module - you'll see the usual CRUD. For starters - press CreateYiiSEOUrl. In the form below enter your meta data.
URL URL - is the relative link to your project. For example - if you want to write meta for the root(homepage) of your project - just write "/" in the URL.
Another example : You need a SEO meta data for http://example.com/sites/news page. Than in the URL - write down "sites/news" (without shash in the beggining)
If you want to use it for multiple links - for example you have links like this http://example.com/post/7 and you need all posts to have the same meta patern - just use following URL "post/*"
Main meta There are 3 metas that we devided from the rest : Title, meta description, meta keywords. In case of title or description - just type the text as you would usually do. In keywords write down phrases separated by commas.
Params Using the params is a tricky part. To use a param in main meta - just use the "{param}" in place where you want it to be. After that - choose it from the list. The list is auto generated from site models and there relations.
Find us on GitHub : https://github.com/Idol-IT/yiiSEO
yiiSEO wiki : https://github.com/Idol-IT/yiiSEO/wiki
For more info or advanced functions contact us : http://idol-it.com/
19.05.2012
17.05.2012
Total 6 comments
include(Controller.php) [function.include]: failed to open stream: No such file or directory
#8221 Thanks for your collaboration. We've updated the code and uploaded new archive. Also assets folder is now added to archive.
#8220 Спасибо за модуль и за быстрый ответ. Несмотря на то, что мой английский коряв, буду писать по-английски, чтобы интересующиеся нерусскоязычные тоже могли учавствовать в развитии модуля.
I'm using non standart directories structure in my projects, so line 303 in the SeoController find nothing:
May be this variant will be more universal:
#8216 Спасибо за замечание.Буду у рабочего компьютера - перезалью архив. Как временное решение - я добавил zip архив с этой папкой в раздел downloads этого проекта.
Thanks for your notice. I will reupload archive as soon as possible. As a temporary matter - I've added a zip archive with assets folder.
I tried to install this module as describe above and got such error:
Необходимый для отображения asset "Z:\home\SITENAME\app\modules\yiiseo\assets" не существует.
sry guys, had to fix a small bug just now. If you happen to add more than 3 meta's with properties you will run into it. It is now fixed and download archive is updated.
Leave a comment
Please login to leave your comment.