Oxwall / SkaDate is designed in a way that if meta data is not specified for certain page by the plugin or system feature responsible for that page, then system will assign that page a default meta data.
For meta description this gets defined in following file: ow_core/application.php
if ( $document->getDescription() === null )
{
$document->setDescription($language->text('nav', 'page_default_description'));
}
In Default Oxwall and SkaDate software index page doesn’t have it’s own description, thus default one is used. Default description is the value of {text key=’nav+page_default_description’} language text key in Admin Panel >> Settings >> Languages.
Defentions: Index page is the page that opens up under http://www.sitename.com/index URL.
To set custom meta description to index page only you must peform following modificaiton:
1. Editing Source code:
File to edit: ow_system_plugins/controllers/component_panel.php
Function to edit: public function index
Find following piece of code within this function:
else
{
$this->setDocumentKey('base_index_page');
}
Add following piece of code into this “else” clause:
OW::getDocument()->setDescription(OW::getLanguage()->text('base', 'index_page_description'));
Overall you should have:
else
{
$this->setDocumentKey('base_index_page');
OW::getDocument()->setDescription(OW::getLanguage()->text('base', 'index_page_description'));
}
What we did here is we have intruduced a new language key that will not will be used as index page’s meta description.
2. Creating new language key
Now we will need to give our language key a value. If you are not familuar to language keys in SkaDate and Oxwall please refer to this post first.
To add a new text key you must open following URL: http://www.yoursitenamehere.com/admin/settings/dev-tools/languages
Click “Add new text”.
Within the first drop down select “BASE” .
Within second input box paste: index_page_description
Within third input box add desired meta description.
Save your changes.
And you are done.
Open your index page ( http://www.sitename.com/index) >> Right mouse click >> View Page Source >> you will see that now your index page has a custom meta description: meta name=”description” content=”my cool custom description for index page only will be here “
luikki:Era sem duvida um espectáculo, mas depois deviam mandar as contas dos alugueres para o governo regl.naioQuanto à produtividade, não é tão grande como parece. Em alguns casos eram bonecos já feitos e que só agora publico. Noutros, quando são feitos agora, não é trabalho é prazer. Quanto à medalha só se o Cavaco gostar muito das minhas sugestões visuais para a Maria.Obrigado pelo teu apoio, são gente como tu que fazem valer a pena continuar.Um abraço
LikeLike