Created
May 18, 2015 13:30
-
-
Save john-henry/827e09230b88ba1359e7 to your computer and use it in GitHub Desktop.
Show list of subscribed entries via Comment add-on and Stash for logged in users in ExpressionEngine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:stash:set_list name="author-comments" parse_tags="yes" parse_depth="2" refresh="6" save="yes" scope="site" replace="no"} | |
{exp:comment:entries sort="asc" limit="500" dynamic="no" author_id="{member_id}"} | |
{stash:comment-title}{title}{/stash:comment-title} | |
{stash:comment-entry_id}{entry_id}{/stash:comment-entry_id} | |
{/exp:comment:entries} | |
{/exp:stash:set_list} | |
<ul> | |
{exp:stash:get_list name="author-comments" unique="yes" parse_tags="yes" parse_conditionals="yes" orderby="comment-title"} | |
<li> | |
<h4>{comment-title}</h4> | |
{exp:comment:notification_links entry_id="{comment-entry_id}"} | |
{if subscribed} | |
<a href="{unsubscribe_link}" class="btn btn-xs btn-primary">UnFollow</a> | |
{if:else} | |
<a href="{subscribe_link}" class="btn btn-xs btn-viewmore">Follow</a> | |
{/if} | |
{/exp:comment:notification_links} | |
</li> | |
{/exp:stash:get_list} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment