You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Is there a user macro I can create that would allow users to click on it and it would have them watch for new blog posts in a space? I would like to put a button on my blog's home page that would allow them to watch all blog posts in the space?
The out of the box watch functionality when you click on "watch" on the home page does not allow you to just watch for new blogs. You can watch for all content, but we only want the blog notifications. Is this possible?
Hi @Heth Siemer
There are 2 options for you.
First option: Out of the box from confluence. Click on a space on the left the "Blog" link. then on the right you have the option, to "Watch the blog"
Second option:
I wrote a user macro:
## Macro title: Watch Blog Button
## Macro has a body: N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Dominic
## Date created: 18.07.2019
## Installed by: Dominic
## This is an example macro
## @param spacetitle:title=Space Title|type=string|required=true|default= |desc=Den Titel, welcher im Button angezeigt wird
## @param spacekey:title=Space Key|type=string|required=true|default= |desc=Den Space Key von dem Space, welcher du abonnieren willst.
<button id="twtr-watch-space-blog" class="aui-button">Abonnieren den $paramspacetitle Blog</button>
<script>
AJS.toInit(function(){
AJS.$('#twtr-watch-space-blog').on('click', function(){
addBlogWatcher();
});
});
function addBlogWatcher(){
jQuery.ajax({
url: AJS.contextPath() + "/spaces/addspacenotification.action?contentType=blogpost&key=$paramspacekey&atl_token="+AJS.Meta.get('atl-token'),
success: function (xhr) {
AJS.$('#twtr-watch-space-blog').text('Du hast geraden den Blog abonniert.');
AJS.$('#twtr-watch-space-blog').attr('disabled','disabled');
}
});
}
</script>
Regards, Dominic
Howdy Dominic,
That user macro looks exactly like what I want, I'll definitely give it a shot! Thank you so so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.