View Full Version : how to make a specific field group collapse/close by default?
Wei Hong
August 4, 2015, 04:52 AM
Dear Flynax Dev.,
Is there anyway that I can make a specific field group, for example: hobbies, to close/collapse by default in posting ads, listings detail, and search page?
Wei Hong
August 6, 2015, 12:18 PM
Dear Flynax Dev,
Please reply, I need to know the answer for another setup for the site.
Thank you
Wei Hong
August 8, 2015, 02:49 AM
Dear Flynax Dev,
I still wanna know the answer for this question. Please reply when you have time
Viktor
August 8, 2015, 03:00 PM
Hello Wei Hong,
If you want hide on listing details:
Go to ftp://templates>>your_template>>tpl>>controllers>>listing_details.tpl
find code:
{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldse t_header.tpl' id=$group.ID name=$group.name}
and replace to:
{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldse t_header.tpl' id=$group.ID name=$group.name hide=$hide}
for hide groups on add listing:
go to: ftp://templates>>your_template>>tpl>>controllers>>add_listing.tpl
and find code:
{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldse t_header.tpl' id=$group.Key name=$lang[$group.pName]}
and replace to:
{include file='blocks'|cat:$smarty.const.RL_DS|cat:'fieldse t_header.tpl' id=$group.Key name=$lang[$group.pName] hide=$hide}
Then open file:
ftp://templates>>your_template>>tpl>>blocks>>fieldset_header.tpl
find code:
<header {if $class}class="{$class}"{/if}>{if $id}<span class="arrow"></span>{/if}{$name}</header>
<div class="body">
and replace to:
<header {if $class}class="{$class}"{/if}>{if $id}<span class="arrow{if !$hide} up{/if}"></span>{/if}{$name}</header>
<div class="body"{if !$hide} style="display: none"{/if}>
save and check again.
PS: You can configure it yourself through admin panel >> Fields ground your_site.com/admin/index.php?controller=listing_groups
find group which you want to hide and click edit icon then find line: Expansion by default and set NO. Save and check check this fields group in front end.
Wei Hong
August 9, 2015, 03:34 AM
PS: You can configure it yourself through admin panel >> Fields ground your_site.com/admin/index.php?controller=listing_groups
find group which you want to hide and click edit icon then find line: Expansion by default and set NO. Save and check check this fields group in front end.
Hi Viktor,
Thank you so much for your guidance. I recalled that I have tried this setting in admincp (expansion by default) and no matter what setting i picked yes or no, nothing changed. Now I applied your code, it worked. But the other way around. If I set NO in "expansion by default" then that group is open. If I set YES then it's hide/closed. As soon as I applied the code, all of the group is closed, because by default, they are set as YES in "expansion by default"
Even in the search page www.domain.com/search
But in search page there is no way I can expand/open the group? How can I fix this?
Wei Hong
August 10, 2015, 05:55 AM
Jump start for the new week :D
Powered by vBulletin® Version 4.1.9 Copyright © 2023 vBulletin Solutions, Inc. All rights reserved.