PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Moving URL in search results to the top, underneath the Title?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Moving URL in search results to the top, underneath the Title?

    I've recently upgraded to version 7, and I want to move the search result URL from the Infoline to the just under the Title. I can do this by modifying the 'settings.php' page, but there is a BIG warning message "Do not modify the PHP code!".

    OK, so I won't modify settings.php

    But is there another way I can move the search result URL to the top, just underneath the Title?

  • #2
    Yes, modifying settings.php is not a good idea because it gets overwritten every time you re-index. And similarly, modifying search.php is a similar problem when you update builds, etc. Not to mention we can't support scripts that have been modified so we won't be able to look at any problems you may have.

    But yes, you can achieve this via some CSS trickery on your search_template.html page.

    For your .result_block and .result_altblock classes, add the attribute, "display: table; "

    For your .result_title and .infoline classes, add the attribute, "display: table-header-group;"

    For the .description and .context classes, add the attribute, "display: table-footer-group;"

    So it should look something like this:

    Code:
    .result_title { font-size: 100%; display: table-header-group;}        
    .description { font-size: 100%; color: #008000; display: table-footer-group; }
    .context { font-size: 100%;display: table-footer-group; }
    .infoline { font-size: 80%; font-style: normal; color: #808080; display: table-header-group;}
    
    .result_block { margin-top: 15px; margin-bottom: 15px; clear: left; display: table; }
    .result_altblock { margin-top: 15px; margin-bottom: 15px; clear: left; display: table; }
    And of course, you can turn off all the other infoline elements ("Terms matched", "Score", "Date", "File size") so that you have just the URL, via the indexer under "Configure"->"Results layout".

    You can also edit/remove the text "URL:" that prefixes the URL line via the Language file under "Configure"->"Languages"->Edit English.zlang language file.

    Hope that helps.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Thanks! I'll give this a whirl and will let you know how I make out.

      Comment

      Working...
      X