Single Article

Visited pages cloud

Category APEX and jQuery

Here is how show visited pages like tag cloud.

I have create sample using custom list region and Ron Valstar jQuery TagCloud plugin.

First create new list template from scratch. Use e.g. name Tag Cloud (Custom 1) and theme class Custom 1.

Go edit your new template and change List Template Before Rows:

<ul class="htmldb-tag-cloud">

List Template Current:

<li value="#A01#" title="#TEXT#">
  <a href="#LINK#">#TEXT#</a>
</li>

List Template Noncurrent:

<li value="#A01#" title="#TEXT#">
  <a href="#LINK#">#TEXT#</a>
</li>

List Template After Rows:

</ul>

Next create new dynamic list from scratch. Use the template you just created. Query Source Type SQL Query:

SELECT NULL,
  p.PAGE_NAME AS label,
  'f?p=&APP_ID.:'
  || p.PAGE_ID
  || ':&APP_SESSION.::&DEBUG.:::' AS target,
  NULL                            AS is_current_list_entry,
  NULL                            AS image,
  NULL                            AS image_attribute,
  NULL                            AS image_alt_attribute,
  COUNT(1)                        AS attribute1
FROM APEX_APPLICATION_PAGES p,
  apex_workspace_activity_log l
WHERE p.application_id = :APP_ID
AND l.application_id   = :APP_ID
AND p.page_id          = l.page_id
AND l.error_message   IS NULL
GROUP BY p.PAGE_NAME,
  p.PAGE_ID
ORDER BY attribute1 DESC

Upload jquery.tagcloud.min.js to workspace static files.

Add to page HTML header:

<style type="text/css">
.htmldb-tag-cloud{
background-color:#EEE;
border:1px solid #3464AF;
position:static;
overflow:hidden;
padding:0 !important;
list-style:square outside none;
font-size:medium;
display:none;
width:400px;
}
.htmldb-tag-cloud a {
font-size:inherit
}
</style>
<script src="#WORKSPACE_IMAGES#jquery.tagcloud.min.js" type="text/javascript"></script>

And page JavaScript Execute when Page Loads:

$("#TAG-CLOUD ul.htmldb-tag-cloud").show().tagcloud({type:"sphere",height:200,sizemin:10,sizemax:20,power:.3});

Create new list region using the list you did create. Go edit list region and add static id TAG-CLOUD.

Maintenance status query

Comments

No comments yet on this article.

Global Right Column

Search

Archives

Subscribe in a Reader