-
Notifications
You must be signed in to change notification settings - Fork 3
Rendering Hook Example
Javascript Hacks utilises the RenderingHook
Interface (blackboard.servlet.renderinghook.RenderingHook
) in the bb-taglibs.jar
file of the Blackboard API. This page briefly explains it usage.
The interface defines two methods:
getKey()
getContent()
The string this method returns determines where the content gets injected. Valid keys at the time of writing are:
-
tag.editModeViewToggle.start
- injects just before the edit mode button on learning systems pages. -
tag.learningSystemPage.start
- injects just before the content on learning systems pages. -
jsp.topFrame.start
- injects into the top frame in the frameset (with the tabs) -
jsp.frameset.start
- injects into page containing the primary Blackboard iframes. -
tags.globalNavPage.start
- injects into any page that has the global navigation controls. -
tag.course.breadcrumb.control
- injects before the page breadcrumbs.
This is the string that will be injected directly into the source of the page.
The extension must be registered in the bb-manifest.xml. This is done by adding an . E.g.:
The content is injected directly into the page source:
Which is then interpreted by the browser:
This example was created using NetBeans IDE, but is very simple should be relatively easy to get working in any development environment.
The netbeans project file assumes that there is a directory at the same level as the project directory named systemlib-sp10 which includes a bb-taglibs.jar library from SP8 or above (probably SP10). E.g.: