ThePortLabs Blog Add New Entry
One of the
most recent additions to our platform is our announcement blocks. Announcement
blocks are an easy to use part of our content management system that allow
community admins to quickly and easily target messages at various portions of
the system.
Out-of-the-box
Announcement blocks come pre-loaded in three areas of the site:
Community landing page – By default, this will only be shown to logged in users of your site. Use this announcement block to announce new features, talk about an upcoming promotion or campaign, or inform users of event
User dashboard – The dashboard block is a great place to encourage users to fill out their profile or upload a profile picture
Group dashboard – The group dashboard block has a similar purpose as the user dashboard. But instead of user features, this is great to inform groups about group functionality or inform group admins of best practices to growing their groups.
Custom
If you
require more than the three standard announcement blocks, we can create more
blocks for you to use.
For template authors
The code
snippet below will pull a content block onto your page:
<xsl:value-of select="iPageInformation:ResetDictionary('dict_ContentBlock')"/>
<xsl:value-of select="iPageInformation:PutDictionaryKey('dict_ContentBlock','sName','CommunityContentBlock')"/>
<xsl:value-of select="iPageInformation:PutDictionaryKey('dict_ContentBlock','sParentID',$sControlID1)"/>
<!—This is one
of the most important lines here: this tells which content block you’re using à
<xsl:value-of select="iPageInformation:PutDictionaryKey('dict_ContentBlock','sContentName','COMMUNITY')"/>
<xsl:value-of select="iPageInformation:PutDictionaryKey('dict_ContentBlock','sXslFileName','ContentBlock.xslt')"/>
<xsl:value-of select="iSMProcessor:ProcessGenericModule(iPageInformation:GetDictionaryCSV('dict_ContentBlock'))" disable-output-escaping="yes"/>
Webservices
Our REST
APIs also implement announcement blocks for read-only use. This is an effective
way to utilize the same content block from your community site anywhere else on
the web. The call to pull the content blocks out is pretty straight forward:
/Community/ContentBlocks?devkey={DevKey}
Note that
this pulls ALL of your content blocks. Since your content block is not likely
to change often, you’ll want to cache this content in your system for a longer
period of time to make sure you’re being as efficient as possible.
Also take
note that all of our REST APIs can be returned as XML or JSON.
FAQs
I’m not seeing the content blocks appear on any of the pages you mention above? If this is the case, you will need to contact your account manager to have the content blocks retrofitted into your community template set
Do I need to know HTML to manage announcement blocks? No, our announcement blocks management area come with a lightweight WYSIWIG built on the popular CKEditor projectCKEditor project
Can I embed Videos in content blocks? Yes, use the “add a video” button.
How about cut and paste from Word? Yes, you can do that too. Use the “Paste from Word” option in the editor