Tagging Quick Reference
Tag and categorize OpenForum pages for better organization and discovery
Key Features
- Add tags to pages
- List all tags
- Find pages by tag
- Tag cloud generation
- Remove tags from pages
- Tag management interface
- Search by multiple tags
Server-Side Usage:
// Get the Tagging API
var Tagging = js.getObject("/OpenForum/AddOn/Tagging","Tagging.sjs");
// Add tag to page
Tagging.addTag("/MyPage", "tutorial");
// Add multiple tags
Tagging.addTags("/MyPage", ["tutorial", "beginner", "javascript"]);
// Remove tag from page
Tagging.removeTag("/MyPage", "tutorial");
// Get all tags for a page
var tags = Tagging.getTags("/MyPage");
// Find pages with tag
var pages = Tagging.findPagesWithTag("tutorial");
// Get all tags in system
var allTags = Tagging.getAllTags();
// Get tag cloud (tags with counts)
var tagCloud = Tagging.getTagCloud();
Client-Side Usage:
// Add tag to page
JSON.post('/OpenForum/AddOn/Tagging/Add', null,
'pageName=/MyPage&tag=tutorial')
.onSuccess(function(result) {
console.log('Tag added');
}).go();
// Get tags for page
JSON.get('/OpenForum/AddOn/Tagging/Get', null,
'pageName=/MyPage')
.onSuccess(function(tags) {
console.log('Tags:', tags);
}).go();
// Find pages by tag
JSON.get('/OpenForum/AddOn/Tagging/Find', null,
'tag=tutorial')
.onSuccess(function(pages) {
console.log('Pages with tag:', pages);
}).go();
// Get tag cloud
JSON.get('/OpenForum/AddOn/Tagging/Cloud')
.onSuccess(function(tagCloud) {
console.log('Tag cloud:', tagCloud);
}).go();
Tag Cloud Format
[
{tag: "tutorial", count: 15},
{tag: "javascript", count: 12},
{tag: "beginner", count: 8}
]
Configuration
- Tag storage location
- Maximum tags per page
- Tag naming conventions
- Tag search options