The Post by Link functionality allows Discussion posts on a specific web-based topic to be initiated from a link within any webpage or email.
EXAMPLE: For example, “discuss this article” links can be placed on the bottom of every page of the magazine website to facilitate users posting about specific content. With correctly formatted URLs and the proper page configuration, posts can begin from links placed anywhere. The posts will surface the promoted webpage in the body of the post with a default subject determined by the link.
How it works
The functionality is achieved through the eg:PostByLink User Control, which performs three functions:
- Verifies the user can post to the discussion (or any discussion if no community is indicated) by prompting login and checking community status.
- Receives variables passed and formats them for initiating a new post.
- Routes the user to the Post Message or Post Reply page, depending on whether the post initiates a new thread or continues an existing thread.
If the user cannot post per the URL variables passed, no routing will occur; rather, the postbylink page will render displaying informational content items and prompting other actions.
The configuration on the Microsite is based on a single page with baseline page code postbylink. The baseline configuration of this page is to include two content items. One achieves the verification and routing to allow posts are created properly. The other content item displays messaging seen when the user cannot post to the discussion or the URL has not passed enough information to facilitate a discussion post.
To achieve the baseline configuration:
- Add a new page through the CMS with the following characteristics:
- Baseline location - a child of the “Participate” main navigation item placed under “Post Message” page folder
- Navigation Title - Post by Link
- Page Title - Rights to Post
- URL Name and Page Code Name - postbylink
- Security Roles Required to View - Authenticated (recommended)
- Show/Hide Navigation - Hide this navigation but leave its content on the site
- To the new page add the first of two content items with the following configuration:
- Name - Post by Link
- Show box unchecked
- Type of Content - User Control
- User Control class or path - eg:PostByLink
- To the new page add the second of two content items with the following configuration:
- Name - Rights to Post
- Show box unchecked
- Type of Content - HTML
- Text input in HTML editor - Sorry, it seems you don't have rights to post to this community at this time. It is also possible that the link you used does not provide enough information to initiate a new post. Please consider posting to another community discussion. (modify this example as desired).
- Repeat to add other content items if desired.
When configured correctly, properly-formatted links will open the postbylink page and initiate posts where the user can post. The message displayed in step three above will display when the user cannot post or the link formatting is incomplete.
The proper link configuration includes the following elements and syntax:
- Website - the site where the postbylink page is configured
- Page code - postbylink (this baseline configuration can be replicated on other pages with other page codes as desired)
- Subject variable - The subject of the discussion post is a string of text with spaces represented by the “+” character.
- URL variable - the webpage to be promoted in the Discussion Post
- Community Key variable - The key found in the url when visiting a community landing page on the main site or the community list in the Admin site (among other pages).
The three link variables link elements must be preceded by the proper character per standard URL syntax. The “?” precedes the subject while “?” precedes the URL and Community Key.