Changing search result display

More
12 years 6 months ago #706 by macio
Changing search result display was created by 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

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago - 12 years 6 months ago #707 by andrea_4g
Replied by andrea_4g on 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; }
Last edit: 12 years 6 months ago by andrea_4g.

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago #734 by macio
Replied by macio on topic Re: Changing search result display
Thank You,

It works for me !

Please Log in or Create an account to join the conversation.

Time to create page: 0.153 seconds