0
Hi Germi,
I need some advize... I'm looking for a way to create a better meta description. I cant edit each album/artist/songs manually as i have too many. When i use the meta option in the component config ALL these pages get the same description and i dont want that. Do you have an other idea hot i can establish this?
I need some advize... I'm looking for a way to create a better meta description. I cant edit each album/artist/songs manually as i have too many. When i use the meta option in the component config ALL these pages get the same description and i dont want that. Do you have an other idea hot i can establish this?
Accepted Answer
0
Hello!
It's easy enough to do by editing the following files:
for artists
/components/com_muscol/views/artist/view.html.php
for albums
/components/com_muscol/views/album/view.html.php
for songs
/components/com_muscol/views/song/view.html.php
For example, you want to see this design in a meta descriptions album using the available variables:
Album name - text - Artist name - text - Album Year
This will replace the code in the file /components/com_muscol/views/album/view.html.php (about 189 line)
// meta description
if(!empty($album->metadescription)){
$document->setMetaData( 'description', $album->metadescription ) ;
}
else {
$document->setMetaData( 'description', $album->name . ' - ' . JText::_( 'ALBUM' ).' ' . $album->artist_name
.''. JText::_( 'RELSD' ).' ' . $album->year.''. JText::_( 'YEARS' ));
}
The description in this case, will this:
Sheer Heart Attack - album of the rock band Queen, released in 1974
It's easy enough to do by editing the following files:
for artists
/components/com_muscol/views/artist/view.html.php
for albums
/components/com_muscol/views/album/view.html.php
for songs
/components/com_muscol/views/song/view.html.php
For example, you want to see this design in a meta descriptions album using the available variables:
Album name - text - Artist name - text - Album Year
This will replace the code in the file /components/com_muscol/views/album/view.html.php (about 189 line)
// meta description
if(!empty($album->metadescription)){
$document->setMetaData( 'description', $album->metadescription ) ;
}
else {
$document->setMetaData( 'description', $album->name . ' - ' . JText::_( 'ALBUM' ).' ' . $album->artist_name
.''. JText::_( 'RELSD' ).' ' . $album->year.''. JText::_( 'YEARS' ));
}
The description in this case, will this:
Sheer Heart Attack - album of the rock band Queen, released in 1974
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »