Is there a way to set up subscription buttons on Custom Pages?

I have a few groups creating Custom Pages to achieve the look and feel that they want without creating a new group for just a forum and Wiki. Is there a way to create subscription buttons for the Wikis and Forums on a custom page? I know the "button" in the widget appears within the application, but it doesn't look like there are these options on a custom page. 

Thanks!

Parents
  • You would need to create a custom widget, the tricky bit here is knowing what to subscribe to as you may not be it the forum/wiki context if you are creating custom pages

    so it would need a configuration property where you can set the forum. wiki etc 

    Then most of the code could be copied from the stock group links widget using some custom code to check for the subscription etc 

    So for example if you knew the forum id this would expose the current subscription state

    #set ($dataContextId = $forum.Id)
    #set ($dataContext = 'forum')
    
    <form>
    	<fieldset>
    	<ul class="field-list">
    		<li class="field-item">
    			#set($subscription = false)
    			#if($dataContext == "forum")
    				## check for existing subs
    				#set ($subs = false)
    				#set ($subs = $core_v2_emailDigest.List(0, 100))
    				#foreach($sub in $subs)
    					#if($sub.Context == $dataContext && $sub.ContextId == $dataContextId)
    						#set ($subscription = $sub)
    						#break
    					#end
    				#end
    			#end
    			<select data-context="$core_v2_encoding.HtmlAttributeEncode($dataContext)" data-contextid="${dataContextId}" data-subscriptionid="#if($subscription) $subscription.Id#else -1#end" class="email-digest ui-select">
    				<option value="0" #if(!$subscription || ($subscription.FrequencyInDays != 1 && $subscription.FrequencyIndays != 7)) selected#end>$core_v2_language.GetResource('NotSubscribed')</option>
    				<option value="1" #if($subscription && $subscription.FrequencyInDays == 1) selected#end>$core_v2_language.GetResource('Daily')</option>
    				<option value="7" #if($subscription && $subscription.FrequencyInDays == 7) selected#end>$core_v2_language.GetResource('Weekly')</option>
    			</select>
    		</li>
    	</ul>
    	</fieldset>
    </form>
    	
    ## then reuse the code from the core widget to update etc (emaildigestupdate.vm) 

  • One of the use cases I've wanted to set up with something like this (someday) is to have a landing page for a group (new members, partners, customers with specific products, etc) and give them a list to say "Here are your recommended things to subscribe to around our community" to let them check them all of on one page. Definitely saving this code for when "someday" comes, thanks  

Reply Children
No Data