add title to search results

mondo
mondo
Offline
0
Hello,
on the search results page I would like to display a title.
Say, I do a genre search for 'rock', above the albums that appear here should be 'rock'. When searching for tags there should be the tag. (similar to the album name on album details)

I use the search function allover my site, it makes perfect sense having such headlines on the result page.
possible to achieve?
Responses (7)
  • Accepted Answer

    Thursday, August 07 2014, 09:47 PM - #Permalink
    0
    that's the second part I pointed out, I said you need to look up in the Database the tag name and such, because using JRequest you will only get the ID..
    The reply is currently minimized Show
  • Accepted Answer

    mondo
    mondo
    Offline
    Thursday, August 07 2014, 12:05 PM - #Permalink
    0
    Thanks for pointing me into the right direction!
    So far I'm just retrieving the id's, how to turn it into names?
    I'm afraid i miss out something important.
    $this->tag_name = JRequest::getVar('tag_id');
    echo $this->tag_name;
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 07 2014, 10:10 AM - #Permalink
    0
    the modification has to go on the file /components/com_muscol/views/search/tmpl/common.php

    basically what I would do is to use the JRequest::getVar() method to see if there's a genre or a tag, then you look up the genre name on the DB, and print it in that page.
    The reply is currently minimized Show
  • Accepted Answer

    mondo
    mondo
    Offline
    Thursday, August 07 2014, 10:03 AM - #Permalink
    0
    Thanks for getting back to me.

    I don't mind the coding, already altered this component a bit.

    I think it should display:
    - if no results = 'nothing found' (I have done that already)
    - if genre+tag = 'rock' 'melodic'
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, August 07 2014, 08:24 AM - #Permalink
    0
    Hello!

    sorry for the late answer.

    this will require a bit of coding on the search result layout page. plus.. what happens if you search for both "rock" and also a tag? what title should display?
    The reply is currently minimized Show
  • Accepted Answer

    mondo
    mondo
    Offline
    Wednesday, August 06 2014, 04:36 PM - #Permalink
    0
    I was just asking..
    and I believe it's possible since all data are known. I'm stuck with trying to echo them out.
    No hint? Pretty please...Germinal, am I asking for too much?
    The reply is currently minimized Show
  • Accepted Answer

    mondo
    mondo
    Offline
    Tuesday, August 05 2014, 07:53 AM - #Permalink
    0
    Added an image to demonstrate what I'm looking for.
    http://improve.cctrax.com/visuals/search.jpg
    The reply is currently minimized Show
Your Reply