Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Nick Parkes
  2. F2C article templating
  3. Friday, 17 November 2017
  4.  Subscribe via email
Hello

Joomla 3.8.2
F2C Pro 6.16.0

I have been searching everywhere for an answer to this but with no luck. I have a template with very many fields where I have used the conditional {if/else/elseif} statements to hide the field if the information is missing. It works well except that I am left with sections of white space where the fields have been hidden. I have tried <div style="display:none;">, <div style="line-height=0;">, <div style="font-size=0;"> and combinations of those. I was also looking through the smarty documentation to find a workaround but everything I try leaves me with these ugly sections of white space.

How to I make it go away?

Thanks,

Nick
Responses (2)
Nick Parkes Accepted Answer Pending Moderation
After many searches and then finally posting I solved my own problem. This created the issue:

<div style="display: none;" id="my7DIV">
<ul>{if $ACCOM_TYPE}
{foreach from=$ACCOM_TYPE_VALUES key=k item=i name=whatever}<li> {$i} <br/> {/foreach}
{/if}
</ul>
</div>

I changed it to this:
{if $ACCOM_TYPE} <div style="display: none;" id="my7DIV">
<ul>{foreach from=$ACCOM_TYPE_VALUES key=k item=i name=whatever}<li> {$i} <br/> {/foreach}
</ul>
</div>
{/if}

No need to respond, I will hang my head in shame and make the necessary changes!
  1. more than a month ago
  2. F2C article templating
  3. # 1
F2C webmaster Accepted Answer Pending Moderation
Hi Nick, thanks for sharing.

YES, the logic is to place any html that needs to be hidden between the IF tags ;)

Enjoy!
Regards, Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 2
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.