Dynamic Site description

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

Dynamic Site description

Postby Drubilar » 11 Dec 2012, 21:39

have you considered using the description of the lists to use as "site description"?
as attached screenshot, all lists are of the same description, to have a dynamic site description consistent with the content increase the pagerank :)
Attachments
Screenshot_4.jpg
Screenshot_4.jpg (43.19 KiB) Viewed 13900 times
Drubilar
Stranger
 
Posts: 8
Joined: 05 Dec 2012, 12:09
Reputation point: 0

Re: Dynamic Site description

Postby Xpycm » 12 Dec 2012, 09:09

Please, open the protected\modules\apartments\views\view.php file.

In the top of the file, after the line:
Code: Select all
$this->pageTitle .= ' - '.$model->getStrByLang('title'); 

you should add:
Code: Select all
if ($model->getStrByLang('description'))
    $this->pageDescription = truncateText($model->getStrByLang('description'), 20); 


This action will allow you to specify the first 20 words from the “Description” field of the listing in meta name="description"
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2

Re: Dynamic Site description

Postby flashvm » 12 Dec 2012, 16:59

thanks,for the news and faq ?

/protected/modules/news/views/view.php
/protected/modules/articles/views/view.php

tried to put there,but does not go, tell me?
flashvm
Stranger
 
Posts: 1
Joined: 12 Dec 2012, 16:53
Reputation point: 0

Re: Dynamic Site description

Postby Xpycm » 12 Dec 2012, 17:20

In /protected/modules/news/views/view.php file:
Code: Select all
if ($model->getStrByLang('body'))
    
$this->pageDescription truncateText($model->getStrByLang('body'), 20);  


and in /protected/modules/articles/views/view.php file:
Code: Select all
if ($model->getStrByLang('page_body'))
    
$this->pageDescription truncateText($model->getStrByLang('page_body'), 20);  
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 46 guests

cron