There are a number of objects that get placed in a "Context" that is used by the particular dispatcher handling the template for a requested flavor. A concrete instance of BlojsomDispatcher will use this "Context" and make the objects in it available, as appropriate, for the particular presentation technology. For example, in the JSPDispatcher, the objects from this "Context" are placed on the request using the setAttribute method.
However, you as a user should be aware of the name and type of objects that are available in the "Context". You can see examples of how they are accessed by looking at the html.jsp (JSP page for the html flavor) and html.vm (Velocity template for the html flavor).
| Key |
Object type |
Description |
| BLOJSOM_ALL_CATEGORIES |
org.blojsom.blog.BlogCategory[] |
All available categories |
| BLOJSOM_BLOG |
org.blojsom.blog.Blog |
Blog information for current user |
| BLOJSOM_CATEGORIES |
org.blojsom.blog.BlogCategory[] |
Available categories underneath the current category |
| BLOJSOM_COMMENTS_ENABLED |
java.lang.Boolean |
If comments are enabled |
| BLOJSOM_DATE_OBJECT |
java.util.Date |
Date of the most recent blog entry or comment (whichever is more recent) |
| BLOJSOM_DATE |
java.lang.String |
Date of the most recent blog entry or comment (whichever is more recent) in RFC-822 format (Example: Sat, 15 May 2004 12:41:21 -0400) |
| BLOJSOM_DATE_ISO8601 |
java.lang.String |
Date of the most recent blog entry or comment (whichever is more recent) in ISO-8601 format (Example: 2004-05-15T12:41:21-04:00) |
| BLOJSOM_DATE_UTC |
java.lang.String |
Date of the most recent blog entry or comment (whichever is more recent) in UTC format (Example: 2004-05-15T12:41:21Z) |
| BLOJSOM_ENTRIES |
org.blojsom.blog.BlogEntry[] |
Entries retrieved for request |
| BLOJSOM_PERMALINK |
java.lang.String |
Entry name if request was for a single entry |
| BLOJSOM_REQUESTED_CATEGORY |
org.blojsom.blog.BlogCategory |
Requested category |
| BLOJSOM_REQUESTED_FLAVOR |
java.lang.String |
Requested flavor |
| BLOJSOM_RESOURCE_MANAGER |
org.blojsom.util.resources.ResourceManager |
Resource manager for retrieving localized strings in a template. |
| BLOJSOM_SITE_URL |
java.lang.String |
Site URL |
| BLOJSOM_USER |
java.lang.String |
Blog ID of the current blog. |
| BLOJSOM_VERSION |
java.lang.String |
Version of blojsom |