Changing search result display

  • macio
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
12 Anni 1 Settimana fa #706 da macio
Changing search result display è stato creato da macio
Hi,

I was wondering if I can change the display of the search results not to show the article title or at least not to show it as a link ?

I've already changed that in the articles options but CP shows them in default.

Cheers
Maciek

Si prega Accesso o Crea un account a partecipare alla conversazione.

Di più
12 Anni 1 Settimana fa - 12 Anni 1 Settimana fa #707 da andrea_4g
Risposta da andrea_4g al topic Re: Changing search result display
There's no such parameter in CP config, nor the component honours main Joomla's setting. We are taking note for a future release.
If you need it quick, it's a very modification.
Edit file components/com_custom_properties/views/show/view.html.php
Change the following function
Code:
function showTitle( $row, $params ){ $text = ""; $show_category = $params->get('show_category'); $text .= "<h2 class=\"cp_title\">\n"; $text .= "<a href=\"" . JRoute::_( $row->href) . "\">" . htmlspecialchars($row->title) . "</a>\n"; $text .= "</h2>\n"; if ($row->category && $show_category){ $text .= '(<span class="cp_category">' . htmlspecialchars($row->category) . '</span>)'; } return $text; }
to
Code:
function showTitle( $row, $params ){ $text = ""; $show_category = $params->get('show_category'); $text .= "<h2 class=\"cp_title\">\n"; $text .= htmlspecialchars($row->title) ; $text .= "</h2>\n"; if ($row->category && $show_category){ $text .= '(<span class="cp_category">' . htmlspecialchars($row->category) . '</span>)'; } return $text; }
Ultima Modifica 12 Anni 1 Settimana fa da andrea_4g.

Si prega Accesso o Crea un account a partecipare alla conversazione.

  • macio
  • Autore della discussione
  • Offline
  • Nuovo Utente
  • Nuovo Utente
Di più
11 Anni 11 Mesi fa #734 da macio
Risposta da macio al topic Re: Changing search result display
Thank You,

It works for me !

Si prega Accesso o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.154 secondi