Where/how to change the default name "Begin" of a custom webpart/module.

LabKey Support Forum (Inactive)
Where/how to change the default name "Begin" of a custom webpart/module. Leo Dashevskiy  2012-04-06 18:25
Status: Closed
 
My <moduleName>.webpart.xml file is as follows:

<webpart title="FlowGraph" xmlns="http://labkey.org/data/xml/webpart">
        <view name="begin"/>
</webpart>


So I would like at the top of my webpart, for the title (, which is on the left on the same darker row, where there are the 3 buttons: move up, move down, and remove on the right), to display not the default "Begin", but rather my webpart's name: FlowGraph.

Thanks.
-Lev
 
 
kevink responded:  2012-04-06 22:21
For each html view, the webpart.xml config file should be named using the same prefix as the view file. So for the "begin.html" view, try renaming your webpart config file to "begin.webpart.xml" instead to see if the title is picked up.
 
dennisw responded:  2012-04-11 07:52
In your <modulename>.webpart.xml you have there add the title so it reads:

<webpart xmlns="http://labkey.org/data/xml/webpart" title="Your title here"><view name="begin"/></webpart>

should work.

We were seeing that it didn't show up right away once the title was added (cached maybe?). We did ours with the standard layout as shown in Labkey docs and it works great.
 
Leo Dashevskiy responded:  2012-04-26 14:09
Ok, so after both pieces of advice above did not work for me, I had to extensively grep through the source code and here is the correct solution that currently worked out for me:

one needs to create a file, called "begin.view.xml" in the "views" folder, alongside your *.webpart.xml (does not seem to matter, what goes in place of the asterisk, does not have to be necessarily -begin-) and begin.html files.

The above mentioned file should contain the following in it:

<view xmlns="http://labkey.org/data/xml/view" title="YOUR TITLE GOES HERE">
</view>

Cheers.
-Leo