Dinamic icon replacement on a GRID

Hi,

I managed to replace an image on the grid dinamically depending on a value. That works fine and no probblem… but I am not able to set the correct Scriptcase path. I have to use a full path (an icon hosted on internet, for example), but I don’t guess using a Scriptcase internat icon path…

I tried with ‘…/_lib/img/sys__NM__ico__NM__lock2_24.png’ etc, but I don’t get anything.

Thanks in advance.

Here, a post, maybe help you.

thanks, but if I’m not wrong, $_SESSION[‘scriptcase’][‘appname’][‘glo_nm_path_doc’] gives you the path of the documents you upload, not the path of the scriptcase icons, doesn’t it?

I also tried img src=’…/lib/img/sys/sys__NM__ico__NM__lock2_24.png’ />", without any result…

You decide of the location of the system folder when you publish, for the dev system the path are defined in option / settings / system folders

To get the current path of those folder (dev or app) use the following $_SESSION variable

$_SESSION['scriptcase']['appname']['glo_nm_path_prod']             Common Lib
$_SESSION['scriptcase']['appname']['glo_nm_path_imagens']          Image folder
$_SESSION['scriptcase']['appname']['glo_nm_path_imag_temp']        Temp folder
$_SESSION['scriptcase']['appname']['glo_nm_path_cache']            Cache folder
$_SESSION['scriptcase']['appname']['glo_nm_path_doc']              Doc folder
1 Like

I think I am missing something… using this variables, I don’t get the real path of the icon…

After a research, I found the real path of all icons on ScriptCase is this:

/opt/NetMake/v9-php73/wwwroot/scriptcase/devel/conf/scriptcase/img/ico

But anyway, if I use this full path ({cerrado} = "img src=’/opt/NetMake/v9-php73/wwwroot/scriptcase/devel/conf/scriptcase/img/ico/lock_24.png’ "; I don’t see any icon…