Tuesday, October 2, 2012

Creating A Sidebar Menu Oracle Portal 11G

I am working on an upgrade from Oracle Portal 10G to 11G and in 10G the customer was using the DHTML menu portlet. Now we are in the final stages, we were having a time finding something built in 11G to make a menu. The client's admin does not write any code so basically I need to make it point and click. To me it is just easier to paste some HTML in there, but you do what you need to do. Basically to add some CSS styling elements into a region you need to use the portal elements so the page knows where to apply the style. Below is a very simple menu you can make using just two elements and some basic table styling. It does the trick and the client just needs to go to the template and add an item for the page links to fill the menu. Here is how you build this. I have already built a portal template called "Home" which has an empty region on the left hand side for the sidebar menu. Go to HTML templates and create a new one. Change the type to HTML Content Layout. This is the code I put in the template. I could have used the default Oracle layout that is autopopulated, but I wanted to show a border below each link. By styling the table (if you view the source of a finshed portal page you will see it is mostly made up of tables), it just made it really simple for me to setup.
.titleorimageid1siteid0 {
color: #FFF;
text-decoration: none;
<table style="border-bottom: 1px solid; width: 150px;"> <td>
Go to your Portal Template and edit the region where you want the menu. Click on attributes. Select use HTML Content Layout. Pick your layout. One note if you use the Portal elements you need to fill in the id and siteid. An easy way to make it match my code is to click on the style tab for your region and change the style to "Main Style".

No comments:

Post a Comment