meta discription albums/artists/songs Issue

onne
onne
Offline
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?

Accepted Answer

Sunday, January 01 2017, 12:08 PM - #Permalink
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
The reply is currently minimized Show
Responses (3)
  • Accepted Answer

    onne
    onne
    Offline
    Friday, December 30 2016, 04:31 PM - #Permalink
    0
    for your info... i use artiojoomsef with your 'extension' as well but cant figure out if this is the way...
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, December 31 2016, 09:01 AM - #Permalink
    0
    Hi,

    but.. if you can't edit each album because there are too many.. which metadescription do you want to have in each album?
    The reply is currently minimized Show
  • Accepted Answer

    onne
    onne
    Offline
    Saturday, December 31 2016, 09:58 AM - #Permalink
    0
    Well..I need some way to create 'automated' meta tags with a variable in them. This being the artist or album name. This way all meta descriptions will be different just like the page titles are now

    Know what i mean?
    The reply is currently minimized Show
Your Reply