Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos
The ability to build portal content from XML files is fairly well known and documented. The existing documentation includes code snippets to assist the process, but I thought I'd try to find a use for the facility that covered creating a portal role.

Building a portal role requires some sort of menu structure and some web enabled content. An obvious example is the list of favourites that you have stored in your browser, so I have taken this as the exercise - build a portal role that replicates the browser favourites.

To keep things simple, I've limited myself to IE, as I can easily find where the favourites are stored! It seems to be under a folder called Favorites in the user's userprofile directory. The favourites are organised as directories and filenames with an extension of .URL.

So, the idea is to browse the folders, make a menu structure for the portal role and make non-delta linked URL iViews. Of course, we also need to make sure we have an entry point set.

Non-delta linked iViews? What's he talking about? Generally we make iViews as separate objects in the PCD and then in the role structure we include them as delta links. That way, if we change the definition of the iView, the role will be automatically kept up to date. I decided not to so this with this example as it would make more PCD objects which realistically would not need to be shared by multiple roles.

After creating the XML file, it needs to be uploaded using the standard iView or some other mechanism.

Some lessons learnt

  • Scripting in Windows batch files is not much fun!
  • Not all favourites are stored the same way. Most of them are a file with a header of [InternetShortcut] and then a URL entry with the URL. These are the only ones I played with.
  • Handling of ampersands (&) isn't much fun with Windows scripting.

The code snippet can be found here