$sitename in browser title Bug

0
I noticed that the component Music Collection is not showing the site's title information that is obtained from the variable $sitename the configuration.php file, for example, if I'm viewing an album in the browser title bar should appear: "name album - site name ". Where should I change so that the site name appear? recalling that Joomla System / Global Configuration in SEO Settings, Include Site Name in the title is set to After.
Responses (8)
  • Accepted Answer

    Monday, September 26 2016, 03:50 PM - #Permalink
    0
    the page title is set in every view in music collection (for example, album name - artist name)
    if you want to append the site name to it, you can make a small code modification in the view.html.php files that serve each view

    for example on the /views/album/view.html.php file, in the line 216 you see:

    $document->setMetaData( 'title', $album->name . " - " .  $album->artist_name ) ;


    you can append the global site name...

    $config = JFactory::getConfig();
    $document->setMetaData( 'title', $album->name . " - " . $album->artist_name . " - " . $config->get( 'sitename' )) ;
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 01:28 AM - #Permalink
    0
    Thanks for the answer. I even changed in the example that you went over, but I got success yet, as you can see at: http://www.bregapop.com/musica
    As a suggestion, it would be interesting in the next component update, these changes are already present as standard.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 01:32 AM - #Permalink
    0
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 09:48 AM - #Permalink
    0
    I can't access this page, it's blank...
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 10:04 AM - #Permalink
    0
    Here is an example of an album, note that the browser's title bar does not display the name of the site only displays the album name.
    http://www.bregapop.com/musicas/W/7-wanderley-andrade/24-o-genio-do-calipso
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 10:06 AM - #Permalink
    0
    and you did the change I suggested in the code?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 10:13 AM - #Permalink
    0
    Yes. I made the changes you indicated in the example, but it did not work. On the site, for example, http://www.bregapop.com/musicas link is an item menu type of the Detailed Layout (MUSIC COLLECTION HOMPEAGE - MANDATORY).
    There is a component that site by entering the code you suggested to cause the site title to appear in any view?
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 27 2016, 10:23 AM - #Permalink
    0
    yes well in this page, the view.html.php file you have to modify is another one..:

    /views/artists/view.html.php
    The reply is currently minimized Show
Your Reply