]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
prettify page names, and drop the redunadant url display
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 4 Jun 2008 02:11:33 +0000 (22:11 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 4 Jun 2008 02:11:33 +0000 (22:11 -0400)
IkiWiki/Plugin/search.pm
templates/searchquery.tmpl

index 3e3e9dfab2bc2a50480a33c92ac75ba276c5bc3d..fc77a7d2fad4cb3e56dbbdd589d3fc3c722a4317 100644 (file)
@@ -68,11 +68,14 @@ sub filter (@) { #{{{
                # index page
                my $db=xapiandb();
                my $doc=Search::Xapian::Document->new();
                # index page
                my $db=xapiandb();
                my $doc=Search::Xapian::Document->new();
-               my $title=$params{page};
+               my $title;
                if (exists $pagestate{$params{page}}{meta} &&
                    exists $pagestate{$params{page}}{meta}{title}) {
                        $title=$pagestate{$params{page}}{meta}{title};
                }
                if (exists $pagestate{$params{page}}{meta} &&
                    exists $pagestate{$params{page}}{meta}{title}) {
                        $title=$pagestate{$params{page}}{meta}{title};
                }
+               else {
+                       $title=IkiWiki::pagetitle($params{page});
+               }
 
                # data used by omega
                $doc->set_data(
 
                # data used by omega
                $doc->set_data(
index dd12d297039edb2cc9a3b3c9d6a2ce03cb6ffbfc..33a7cb6fad600b400f268bf44a1a7c6ba1948800 100644 (file)
@@ -76,7 +76,6 @@ $if{$field{size},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesiz
 </td>
 <td><B><A HREF="$field{url}">$html{$or{$field{caption},$field{title},$field{url},Untitled}}</A></B><BR>
 <small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br>
 </td>
 <td><B><A HREF="$field{url}">$html{$or{$field{caption},$field{title},$field{url},Untitled}}</A></B><BR>
 <small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br>
-<A HREF="$field{url}">$html{$field{url}}</A><br>
 <small>
 $percentage% relevant$. matching:
 <i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> and <i>}</i></small>${for lynx:}<p></td></tr>}
 <small>
 $percentage% relevant$. matching:
 <i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> and <i>}</i></small>${for lynx:}<p></td></tr>}