OS Property support center

Hide a field on a module if its value is empty

  • julian
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 7 months ago #102878 by julian
In this case, if I leave blank the sq meters field, I don't understand why OS Content Slider module shows the empty field with a "0" as a value.
It doesn't happen the same with pthe parking field, if that is empty in not shown as 0
Attachments:

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

More
7 years 7 months ago #102886 by Mr. Dam
Hi Julian
To solve the problem, you can open file:
root > modules > mod_os_contentslider > tmpl > default.php
or
root > templates > your_using_template (if exists) > html ? mod_os_contentslider > default.php
Find:
Code:
if($configClass['use_squarefeet'] == 1){
and change to
Code:
if(($configClass['use_squarefeet'] == 1) && ($row->square_feet > 0)){

Good luck
Dam

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

  • julian
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 7 months ago #102996 by julian
This is not working

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

More
7 years 7 months ago #103004 by Mr. Dam
Hi Julian,
Please submit ticket and send your site url with super admin account. I'll check the issue for you, it will save our time
Thanks
Dam

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

More
7 years 7 months ago #103010 by Stephen
Hi

Is this possible to implement in a future release?
Emty or blank field/s should not be seen in frontend.

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

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

More
7 years 7 months ago #103011 by Mr. Dam
Hi Stephen,
I need to know exactly the problem before i can decide to implement it in future version.
Thanks
Dam

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

  • julian
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 7 months ago #103136 by julian
That worked on the module, but not on the frontpage viewing of the component.

See attachment
Attachments:

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

More
7 years 7 months ago #103147 by Mr. Dam
Hi Julian,
With Theme3 listing, you can modify listing and result layout in:
root > components > com_osproperty > templates > theme3 > listing.html.tpl.php and result.html.tpl.php
Find:
Code:
if($configClass['use_squarefeet'] == 1){

and replace by
Code:
if(($configClass['use_squarefeet'] == 1) and ($row->square_feet > 0)){

Thanks
Dam
The following user(s) said Thank You: julian

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

  • julian
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 7 months ago - 7 years 7 months ago #103149 by julian
That is working but in this case, if we take a look to the same property, a property that has definned the square meters, the square meters appear only in property details and in front page module but NOT in "OS Content Slider module."
we are close...
Attachments:
Last edit: 7 years 7 months ago by julian.

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

More
7 years 7 months ago #103172 by Mr. Dam
Hi Julian,
Please contact with me through Ticket system, i will help you to solve the issue.
Thanks
Dam

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

Moderators: Mr. DamNguyen Phu Quan