     switch prefix
       when "#" then token = tagMap?[id]
 
-    return "#{prefix}#{if token then token.title else title or ''}"
+    tagTitle = if token then token.title else title
+
+    return ""  unless tagTitle
+    tagContent =
+      """
+        <span class="kdview token">
+          <a class="ttag expandable" href="#{uri.address}/#!/Activity?tagged=#{title}">
+            <span>#{tagTitle}</span>
+          </a>
+        </span>
+      """
+    return tagContent
 
 createActivityContent = (JAccount, model, comments, createFullHTML=no, putBody=yes, callback) ->
   {Relationship} = require 'jraphical'

    hash = account.data.profile.hash
  return hash

getPlainActivityBody = (activity) ->
  {body} = activity
  tagMap = {}
  activity.tags?.forEach (tag) -> tagMap[tag.getId()] = tag

  return body.replace /\|(.+?)\|/g, (match, tokenString) ->

{argv} = require 'optimist'
{uri} = require('koding-config-manager').load("main.#{argv.c}")

forceTwoDigits = (val) ->
  if val < 10
    return "0#{val}"
