Skip to main content
List Manager logo
List Manager Forum

Card question

User moon_1262

Hi,

I am trying to find a way to prevent displaying of field label in card view when there is no data for that field...

I tried using jQuery and :empty selector but somehow that did not work. Maybe because of the way LM loads.

Anybody thinks of another way ?

Thanks,
Regards,
--
Pascal

Moonsoft support

Hi,

If you have average knowlegde of jquery, you can add script code after cards loaded. Cards are loaded using 'createCardLayout...()' function at JOOMLA/modules/mod_listmanager/tmpl/content.php, so you can add jquery code at the end of this function (around line 554).

Regards,

User moon_1262

Thanks. That did it.

So for anyone interested, you just have to add the following jQuery at the line 546 of /modules/mod_listmanager/tmpl/content.php :

jQuery(".lmcardcontentblock>.lmcarditem_name+.lmcarditem_data:empty").parent().remove();

to remove entire block when there is no data for a field.


Regards,
--
Pascal

Moonsoft support

Great it worked, thanks for sharing.


Regards

...
CalcBuilder

Create dynamic calculators

Buy now!
...
List Manager

Build different lists for your site

Buy now!