Custom List Template not show Calc element with Images if showEmpty = false

jmoises

Active Member
Hello, i create a Custom List Template (copy the div template) but for some reason when i set showEmpty = false, is not showing a calc element that show and image any idea?

Thanks
 
Because the test for empty does a strip_tags() ...

Line 23 of default_row.php ...

Code:
//skip empty elements but don't skip the checkbox (delete, list plugins)
if (isset($this->showEmpty) && $this->showEmpty === false && trim(strip_tags($d)) == '' && $heading != 'fabrik_select') :

... and an IMG tag is all tag, no content. You can change that to just

Code:
//skip empty elements but don't skip the checkbox (delete, list plugins)
if (isset($this->showEmpty) && $this->showEmpty === false && trim($d) == '' && $heading != 'fabrik_select') :

... although it might then show other "empty" elements that on;y have structure, no content.

-- hugh
 
Thanks _Hugh, yes i found that line and try to add other type of validations but did not work, what is the
strip_tags does in that line?

Thanks
 
It strips tags. :)

Meaning, it removes all HTML markup. So (say) "<a href='index.php'>a link</a>" become "a link".

http://php.net/manual/en/function.strip-tags.php

The reason it does that is that some elements render markup when empty, like a checkbox might be "<ul></ul>", so this was a quick and dirty way of making sure that elements which only consisted of (otherwise empty) HTML markup were correctly identified as "empty". Unfortunately, your case of just an img tag fails, because it is pure markup, there's no text that isn't part of the img tag.

-- hugh
 
LOL glad i ask because i add a Link Element and didnt work,.... lol

Thanks for the info Hugh
 
I just need to show 4 elements in the list, do you think is better ot use specific element vs the for each?

i all ready remove the strip_tags and work great, but i notice that the Link element in the list is not working ok even with the default div, and bootstrap template.
 
Last edited:
my bad, the Link element it is on code but is not show in browser here is the code genereted

Code:
<div class="row-fluid fabrikDivElement">
        <span class="mytable___myUrl fabrik_element fabrik_list_4_group_4"></span>    
</div>
 
I'm still not clear what the problem is. Should there be a link? In other words, should it be empty, or should it have a title and link?

-- hugh
 
is a Link Element i was expecting a Link render in the List right? ¨should it have a title and link¨, i try to use the Button but i notice Buttons dosnt work on List.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top