Show glyphicon incon in list column

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
faraz
User
Posts: 35

Show glyphicon incon in list column

Post by faraz »

i want to show glyphicons in list page based on a condition:

I am using row_rendred event but no effect:

function Row_Rendered() {
if ($this->sync_status->ViewValue == "YES"){
$this->sync_status->ViewAttrs["class"] = "<span class='glyphicon glyphicon-remove-circle'>&nbsp;</span>";
}

}


mobhar
User
Posts: 11741

Post by mobhar »

Just change this:
$this->sync_status->ViewAttrs["class"] = "<span class='glyphicon glyphicon-remove-circle'>&nbsp;</span>";

to:
$this->sync_status->ViewAttrs["class"] = "glyphicon glyphicon-remove-circle";


faraz
User
Posts: 35

Post by faraz »

No effect.

if i use the below, it is working fine:
if ($this->sync_status->ViewValue == "YES") {
$this->sync_status->ViewAttrs["class"] = "bg-warning text-warning";
}

but if i use the bolow, it does'nt work:

if ($this->sync_status->ViewValue == "Yes") {
$this->sync_status->ViewAttrs["class"] = "glyphicon glyphicon-remove-circle";
}

I am using Version 2019.


mobhar
User
Posts: 11741

Post by mobhar »

Glyphicon for Bootstrap 3. PHPMaker v2019 uses Bootstrap 4, and it does not use Glyphicon anymore. Please use icons from FontAwesome instead, for example:

$this->sync_status->ViewAttrs["class"] = "fa fa-bell";


faraz
User
Posts: 35

Post by faraz »

Thanks a lot.


Post Reply