Archive for October, 2009

Site Studio 10gR4 Link to Rendition

In my Oracle OpenWorld 2009 demo I showed how to link to specific renditions from a WYSIWYG Element in the Site Studio 10gR4 Contributor Application. This post is about that topic and one of the components I demonstrated during that session.

Download the Sample Link to Renditions Component now.

You may also want to check out the other related posts and free components: Web URL Map Extras and Web and Web Sites Menu Filtering.

This particular component is very simple. We accomplish this by overriding two Dynamic HTML includes named ss_compute_doc_url and rendition_info_select_form. Crack the component open to see more specifics.

Once this component is installed (either via Component Manager in the Admin Server or Component Wizard) the select buttons next to each rendition in the Renditions page will insert the correct rendition into the contributor element.

Disclaimer: Accessing renditions may pull the file from a zip file. To learn more about how renditions are stored and the performance implications of this kind of flexibility please contact your favorite Oracle UCM/WCM/URM/DAM partner. Solutions do exist, and they can guide you through the pitfalls.

Step One

Step Two

Step Three

Step Four

Web URL Map Extras

Grab the Web URL Map Extras Component.

In my Oracle OpenWorld 2009 demo I showed how to use the Web URL Map feature of Content Server to make images and renditions easier to use in Cascading Style Sheets. This post is about that topic and one of the components I demonstrated during that session.

One way to make referencing images (and especially renditions) in Cascading Style Sheets and other places in your web sites is to use the Web URL Mapping tool that comes with Content Server. Check out Kyle's blog, he has a whole post about this feature.

I have several of these mappings that I always like to add to a server. So, I made a component that will add these mappings to the server when you install the component. Also, I wanted an example component showing how you can read from a defined map and add it to another map. Hence, the WebMapUrlExtras component was born and is available here.

WebMapUrlExtras adds the following four mappings.

w/
pass in a dDocName and get back the web rendition of an image

n/
pass in a dDocName and get back the native file

qs/
pass in a query string and get back the quick search results

r/
pass in a dDocName and get back the web rendition, or you can optionally specify the rendition by tagging on a ?Rendtion=<rendition name>

Prior to the component your Web Map URL configuration might look like this:

After installing the component and restarting it should look similar to this:

Web Sites Menu Filtering

I am starting to release some of the example components demonstrated at my session this year at Oracle OpenWorld 2009. In the demo I briefly showed the Web Sites menu and talked about filtering the sites in this menu based on UCM Roles. This component demonstrates how one might accomplish such a task. As other articles related to my session come on line I will inter-link them together.

You know that Web Sites menu Site Studio adds to Content Server? Can I limit the links in that list somehow? This question is asked fairly regularly. I wanted to get a sample of how one might accomplish just that out for general consumption. Once you see an example accomplishing the filtering of that list you’ll be able to apply your own specific business logic as well.

In this example we’re going to use Roles to control what web sites are listed in the menu for any given user. I’ve seen this list controlled by Roles, Accounts, Custom User Metadata and every combination of those aspects and more. This is a LOT less about securing sites away from the users (as it doesn’t do that AT ALL) and more about thinning the sites list to something more context appropriate for individuals attempting to do their everyday job.

How to do this? Override the custom_finish_layout_init dynamic html include. Here’s the important snippet (don’t worry, there is an example component!):

<$c=" STARTING EDIT HERE, JS"$>
   <$if UserIsAdmin OR userHasRole("SSMENU" & siteId)$>
  navBuilder.addChildNodeTo('SS_DISPLAY_WEBSITES'
, 'item'
, 'id==SS_WEBSITE_<$n$>'
, 'label==<$js(label)$>'
, 'url==<$js(siteRef)$>'
, 'icon==WebItem.gif');
   <$endif$>
<$c=" ENDING EDIT HERE, JS"$>

So, sysadmin has the admin role, so s/he can see our three site samples in the web sites list:

Sysadmin Sample Image

Now, pretend we’ve created a new user named SingleSiteGuy (stay on task here, this is not a dating site side story…). We’ll give SingleSiteGuy our new SSMENUPayPalDemo Role.

Role

And TA DA! Now SingleSiteGuy can only see the menu we gave him a role to access.

Single Site Guy

Grab the Websites Menu Filter Sample Component.