Adjust which custom fields display in results [Articles Good Search module]

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

#
I was hoping that if I changed the fields to display 'after display' (meaning after readmore text), that maybe they wouldn't automatically display in the results.

Unfortunately I know that the 'core' category blog view makes this mistake as well.



This would allow me to 'dynamically' determine exactly what displays in the search results without having to change the layout.

Ideally, what I want would be to display the title, image field, and 'resize' the image, if I had to change the default search results which file do I use to do that, and how would I include 1 specific field in that result? especially if that field is an image?

thanks!
Attachments:

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

#
Hello, Rutgers.

You can modify this file (create override first):
plugins\system\plg_articles_good_search\template\com_content\gsearch_blog_item.php

There are an events beforeDisplayContent and afterDisplayContent coded in the template file, and in each Field parameters, you can select 'Automatic display' parameter where it should be rendered.

Also, in this template file, you can use this code for call some specific field:
$fields->{"name"}->title and $fields->{"name"}->value
E.g.
<?php echo $fields->{"test1"}->title . ' - ' . $fields->{"test1"}->value; ?>

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

#
Thank you for your response...

My hope was to not have to create an override... so instead I did this with classes...

1. I added a class to the fields: search-hide-field
2. In the module definition of classes I set search-hide-field: display:none

this worked perfectly! Now I can just 'hide' the fields I do not want to display.
snipboard.io/tVDeIU.jpg

Next question.
1. I would like my DEFAULT view to be a 'grid view'
2. I would like to adjust the grid view to display in 3 columns (isntead of 2)
snipboard.io/NYIzS4.jpg

One more question:
I'm using a search module, and I'm including it within a content article (with load module)
once I process the search, the search 'criteria' disappears, is there a way to keep that on the page?

thanks for your help

FYI, we are on our way to purchasing your product, we are a University (Rugers, State university of NJ), I have the approval, we are waiting on getting a new 'card' so we can process the purchase.

thanks!

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

#
Hello, Rutgers.

1) 2) You can use 'Template columns' for make search results view in a grid.

3) Not sure about it without checking. Maybe it can be a cache.

Ok, thank you, great to know it.

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

#
Cache is not displaying 'colors' properly...

Before I run the search:
snipboard.io/y3Rg0W.jpg

After i run the search:
snipboard.io/i6adHy.jpg

Styles that I applied:
.slider-handle {
background-color:#cc0033  !important;
    background-image: -webkit-linear-gradient(top,#cc0033 0,#2e6da4 100%)  !important;
    background-image: -o-linear-gradient(top, #cc0033 0,#cc0033 100%)  !important;
    background-image: linear-gradient(to bottom,#cc0033 0,#cc0033 100%)  !important;
}

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

#
Sorry, I can't debug it without site check.

- Try to specify css path, e.g. div.some-more-selectors-here .slider-handle { ....
- Change extra css location to your site template's stylsheet