Did You Know? -- May 2001

By Hervé Deschamps, Oracle Corporation.

Portal Quick Security

Here is a quick way to give public execute access on all PL/SQL sub-folder folders in a given folder.

update wwv_corners
set ispublic =1
where siteid = 73 and
      parentid = 1 and
      type = 4 -- plsql folder

Portal: Show an item

Showing an item (like a text item) is more challenging than showing a folder in a browser. Here is one way of doing it:

How to do NAME anchors in Portal Content

This tag is used to name a specific location within your web page so that it can be the destination of a link. It is used to enable links to jump around within the same document, and so that links coming in from other documents can take the reader directly to an interior location, rather than having to go only to the top of the document. The larger your document, the more essential this tag is. A block of text that is enclosed between an <A NAME> and an </A> is described as having been "named."

Example: <H4><a name="ex4">Example 4:</a></H4>

There is one little problem with this in Portal. When you try to create a link that points to an NAME anchor: <a href="#ex4">Go to Ex. 4</a>, it may or may not work. It does not work when you do this in a Text item that is "Displayed Directly In Folder Area". What happens in this case is that when users click on that link, Portal takes them back to their portal home page. Why? Because when portal displays a folder, it sets the HTML base to something like <base href="http://myServer:7777/pls/portal30/">.

Here is a quick workaround using Javascipt:

First define this function somewhere in the folder content:

function goAnchor(where) {
window.location.hash = where
Then you can link to your anchors like this:
<a href="#" onClick="goAnchor('ex4');return false">hdd link to example 4</a>

Hervé Deschamps is a Technical Manager with Oracle Corporation. Over the years he has developed a number of applications using Oracle Development Tools and others.  He has an extensive experience of all phases of the development life cycle. He is also known in the technical community for his article publications centered around best custom development practices and for his user group presentations. You can reach him by e-mail at herve.deschamps@.oracle.com. He also maintains a web site full of articles, scripts, tips and techniques at http://www.iherve.com.