Hide a value or data on table

by Annie   Last Updated June 19, 2018 21:10 PM

I'm using this Mshah frontend user manager extension. I have below table and I want to hide the "Registered" value from that column, is that possible?

enter image description here

As you can see, the third column is a user group title that a user belongs to, and I want to hide the Registered value if possible.

if ($isAdmin || $groupNames=='ums') {
       $query="SELECT a.*,CASE a.block WHEN 0 THEN 'Active' ELSE 'Inactive' END as status,group_concat(b.group_id) as ucheckbox,group_concat(c.title) as title,c.id as groupid from `#__users` a left join `#__user_usergroup_map` b on a.id=b.user_id left join `#__usergroups` c on b.group_id=c.id group by a.id ORDER BY a.id ASC";
        $db->setQuery($query);
        $rows=$db->loadObjectList();
        return $rows;
    } 

Above is the mysql query code but I don't think can use NOT IN or <> as it is filtering the results instead.



Answers 1


The way to do it is by overriding the view template.

1 - First you have to understand how to create an override of a component view.

This tutorial may help you:

https://www.ostraining.com/blog/joomla/overrides/

2 - Then you have to locate the code that renders the table.

There is not much we can do here without seeing the code, but I assume that you may have something like:

<td><?php echo $userGroups ?></td>

Again, this can be written in very different ways.

3 - Finally, change the output in order to eliminate "Registered"

<td><?php echo str_replace('Registered','',$userGroups) ?></td>

I hope this can give you a clue how to solve it.

Piero Marsilio
Piero Marsilio
September 29, 2015 17:41 PM

Related Questions



Make module titles linkable

Updated August 11, 2015 17:04 PM

Create a new macro for listing rockcandy

Updated August 03, 2015 16:04 PM

How to show menu name instead "SUB MENU " each page?

Updated February 23, 2016 01:04 AM

How to remove module on mobile device

Updated July 27, 2016 08:04 AM