Post by Link is a feature that makes it possible for a community user to initiate a Discussion post in a community via a link on an external web site. The idea is to make it easier to discuss the content/topic of the page that hosts the link.
When the link on the external site is clicked, it triggers a Discussion post (or reply) in your community site. The user just has to sign in to post to the Discussion.
Requirements
Several things are required in order for Post by Link to work.
- The link has to be properly configured to point to the community, as described in Link configuration, below.
The user who clicks the link has to have:
- log-in credentials in order to access the targeted community and
- permission to post to that community.
Example
You add a Post by Link link labeled Discuss this article, to a page on your association's site. When a user clicks the link and logs in to your community, the post surfaces the linked page in the body of the Discussion post with a subject that was pre-configured in the link.
How it works
The Post by Link functionality:
- Verifies that the user can post to the Discussion (or any Discussion if a community is not indicated) by prompting login and checking community status.
- Receives the variables that are 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 Discussion or continues an existing Discussion.
If the user cannot post per the URL variables passed, routing will not occur. Rather, the page that is hosting the postbylink will display the "invalid/error" message that you have configured in the Rights to Post content item in Page Designer (as described in this article).
Microsite configuration
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.
This section details how to set up a page in your community site for Post by Link-based Discussion posts. You have to:
- Access the CMS to add and/or configure a navigation page.
- Access Page Designer to configure two widgets; one each to:
- verify the user and route them to the correct Discussion page.
- specify "error" text if an issue occurs.
Set up the Post by Link page
Access the CMS from the Admin Toolbar:
- Click Edit Navigation to access the CMS Navigation page which shows your site's navigation structure, with your current page selected.
- Click the + to expand the Participate section.
Click the – to collapse other sections above Participate. - Locate the Post by Link page, and click to select it.
- In Page Properties on the right (you might have to scroll up), set or verify the properties that are described in the table below the image.
Setting | Description |
---|---|
Visible in Navigation | Make sure that this box is unchecked. |
Navigation Title | (Required) Displays as a link in the site navigation. Recommended Value: Post by Link |
Page Title | (Required) This displays in the heading of the page. - If this is blank, the Navigation Title displays instead. - Make sure that the Show Page Title box is checked. Recommended Value: Rights to Post |
Page Code Name | The unique identifier of this page; this can be used as a shortened URL. |
URL Name | (Required) The value that displays in the page's URL in the address bar. Recommended Value: postbylink |
CSS Wrapper Class Name | leave this field blank |
Security Roles Required to View | The permission level that is necessary in order to view. Recommended Setting: Authenticated (i.e., logged-in users) |
Show/Hide Navigation | Hide this navigation but leave its content on the site. |
- Click Save to preserve your settings.
Now that you've added and configured the navigation page, access Page Designer to configure the widgets.
Configure the widgets
This section describes how to access Page Designer and configure the two widgets that support the Post by Link functionality.
In the CMS tree structure:
- locate the Post by Link page,
- click the ellipsis icon (...), and
- select Edit to access Page Designer.
The two widgets already populate the page; configure them as described below.
Post by Link
This widget to verifies the user's permissions and routes the user to the correct Discussion page.
- Click the Post by Link widget to select it.
- Check the boxes for:
-
- Super Admins Only to restrict access to this widget.
- Hide to hide this page.
- Click Save.
- Click the Rights to Post widget to select it.
Rights to Post
Use this widget to specify "error" text that displays to the user if there's an "access" issue (e.g., incorrect permissions) or "malformed link" issue (e.g., a problem with the link that the user clicked).
- Check the box for Super Admins Only to restrict access to this widget.
- Accept the default "error condition" text or click the pencil icon on the widget to open editor where you can specify and format your preferred text, as shown.
Link configuration
The link that is used for Post by Link must be properly formatted in order for it to work as intended. The link has the following required variables which you must replace with your unique values before placing the link on an external page.
[website][pagecode]?[subject=]&[URL]&[communitykey=]
Link notes
The "subject" and "communitykey" variables are not italicized because these are not replaced. You must specify these variables, followed by an equals sign (=) and the appropriate subject and Community Key.
Note the ? character and two instances of the & character; their proper placement is required.
Link variables
The variables are:
- website - the URL of your community site (e.g., hug.higherlogic.com)
- pagecode - this must be whatever was specified for the Page Code Name (or URL Name) field in Page Properties for the Post by Link page in the CMS; postbylink is recommended
-
subject - the title of the Discussion post; it should reflect the content of the linked page
NOTE: use a +, not a space character, to separate words (e.g., Holiday+Plans) - URL - the webpage to be promoted in the Discussion post
- communitykey - the community's unique identifier; it can be found in the URL of the community's home page and in the Community Key column of the Communities report in Admin > Community > Reports
Example postbylink
Below is an example, properly configured, valid Post by Link link. In the example, note the following important items.
- The [ ] have been removed; do not use these characters when configuring your link.
- You must include the protocol (e.g., https://) in the website and URL values.
- Do not use spaces in the subject variable; use a plus symbol (+) in between words.
- You must include the ? character after the pagecode variable (below, "postbylink").
- You must include the two instances of the & character, one before and one after the URL variable.
https://www.MyCommunity.com/postbylink?subject=Holiday+Plans&https://www.holidays.com&CommunityKey=dc2-d659-417c-af00-5dbd9
When this link is clicked on the external page:
- the user will be redirected to the community log-in page, where, after logging in
- the user will be taken to the appropriate (new or reply) Discussion page, where
- the Discussion title will be populated with the subject (Holiday Plans), and
- the body of the Discussion will be populated with the topic from the link-host page (www.holidays.com).
NOTE: The text that in the Rights to Post widget will display if:
- any aspect of the link is invalid, or
- the user is not authorized to access the community site, or
- the user lacks permission to post to the community's Discussions.
Troubleshooting
If you have one or more draft Discussion posts, you might encounter issues with Post by Link posting.
- Navigate to My Contributions > My List of Contributions.
- If there are any drafts, either:
-
- delete it/them or
- complete and publish it/them
Then try the Post by Link again.
TIP: If you are still having issues, create a case for Higher Logic Support.