Kenneth Brill

Making studio a little easier to use

Discussion created by Kenneth Brill on Dec 22, 2019

I am combining several custom modules back into stock modules, so I have many duplicate fields and relationships to put on views.  My issue is mostly with one-to-many relationship fields but there are also several places where fields have similar or exactly the same name.  This means that in Studio there is NO way to tell them apart and I have to keep referring back to the record.php to find out which fields is where.


This lasted far longer than I should have allowed and one night about 10pm I finally got tired of it and thought to myself "what if I blew away the language files so all the fields would then revert to their LBL_NAMES".  This was a brilliant idea that had one fatal flaw, on our system many of the field names have fallen out of sync with their actual usage and others had drifted from the text in their LBL_NAME.  So the text in LBL_SALE_COMMISSION is now "Percent" or something like that which means I am only a little bit better off.


So after a search that also took far longer than it should I found the code that painted the fields on the Studio screen and played with it until I got what I wanted.  Below on the left is the original screen and on the right is n=my new look.

Studio ScreenShots


Now I have the actual field names (in blue) to look at for reference.   It cut hours off my task.  I am sure there is an upgrade safe way to do this by making a new file called "custom/modules/ModuleBuilder/tpls/layoutView.tpl" and making changes there.  I am onsite so I can edit the core files.  I normally do not like to to this but I don't really want to track changes to this file every upgrade so if this functionality disappears I know the upgrade overwrote it and I can simply reapply it.
The changes to "modules/ModuleBuilder/tpls/layoutView.tpl" are as follows

<span class='field_name'>{$}</span>
<span class='field_label'>{$col.label}</span>
<span class='human_label' style="color: blue"><b><i>{$}</i></b></span>

In that file, anywhere you see the <span> with a class of 'field_label' you add the span with a class of 'human_label'.  That's it.  No QRR needed just clear your browser cache and it will show up.


I hope someone else finds this useful.