Moonsoft Software Solutions

Card question

Started 17 Jul 2015 · 3 replies

  1. 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
  2. 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,
  3. 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
  4. Moonsoft support
    Great it worked, thanks for sharing.


    Regards

Still stuck?

Customers with an active license can open a support ticket.

Log in to open a ticket