The news reader widget is for displaying a news feed. You can configure the News Reader Widget with a specific URL and publish it to the Widget Library. The tip of the day is that you can create your own RSS xml and have the News Widget as a Menu Widget with a list of different programs that can be launched directly from the widget. In this post I’ll show you the syntax of the XML and how to publish the widget to the Widget Library.
Start by creating a list of programs that you want to have in your Menu Widget. My example is below. The RSS feed is more or less a xml file with items. If the item has no description the link will be launched on double click but if there is a description the widget will show the details in a new page and the link will be available under the “details” link. Unfortunately it is not currently possible to have URL:s in the description and have them converted to clickable links. If this is a feature that is important to you I suggest that you contact support and ask for it. It would have been nice if we automatically converted all Lawson Smart Office links to launchable links within the context of the Widget. We already do that kind of stuff in the chat and in the Communicator (using channels to push out messages).
My example XML looks like this:
<?xml version="1.0" encoding="utf-8" ?> <rss version="2.0"> <channel> <title>Programs</title> <description>This is an example of a RSS feed</description> <lastBuildDate>Mon, 28 May 2012 00:01:00 +0000 </lastBuildDate> <pubDate>Mon, 28 May 2012 00:01:00 +0000 </pubDate> <ttl>1800</ttl> <item> <title>Wiki</title> <description></description> <link>http://www.wikipedia.org/</link> <pubDate></pubDate> </item> <item> <title>Customer - CRS610</title> <description></description> <link>mforms://crs610</link> <pubDate></pubDate> </item> <item> <title>Entry with comment</title> <description>This is an item with a comment.</description> <link>mforms://crs610</link> <pubDate></pubDate> </item> </channel> </rss>
You need a web server where you can publish this file so that you can add the link in the News Reader Widget settings. In my case I just added it to my local IIS.
And placed the test file in the Root.
The result looks like this. Notice that the title of the channel is used as title on the Widget and the items are the items in the list.
The widget is now on your canvas. You can play around with the XML file and continue to add stuff since it will reload automatically (or when LSO starts up). This trick should work with all version of Lawson Smart Office, even with Lawson Smart Client.
The next step is to publish your widget to the widget library. In my version I simply right click on the title area of the widget to open the context menu and select publish. (I am an Administrator).
If you don’t have the menu please check that you are an administrator (the best way is to check if you have an Administration Tools node in the Navigator). If you are an administrator the publish tool might not be available in your version of LSO (I’m not sure at what version it was added) and you will need to modify a xml file in order to do the registration. Check the administration documentation and search for ‘predefined widgets’.
Next step is to configure the widget. I would change the ID and set a default title and description. The title and description will be used in the Widget Library. You can make the widget read only so that the users cannot change the URL or access the settings.
Press save and the new widget is published to the server.
Restart Lawson Smart Office and verify that your widget is in the Widget Library!
Now it can be a bit tricky to find the URL to a program that you would like to add, especially if it isn’t a M3 or S3 program becuase you tend to learn their short names by heart.
There are lots of ways to check the URL of a program. I usually take a launched program and minimize it, then I drag the icon in the taskbar to the canvas and create a shortcut. I can drag and drop directly from the Navigator’s recent tab as well.
Once I have the Shortcut on the canvas I right click and select settings from the context menu. And there it is. Easy to select and copy!
I plan to write a follow-up post where I show you how you can add different canvas files as links directly from a widget. That way you can have one widget but load different canvases depending on your tasks at hand.