linking to "new blog post" page from wiki content

Hello

Confluence: 4.1.2

Is it possible to make a link to "new blog post" (createblogpost.action) in wiki content body?

Currently I am making a link to http://example.org/confluence/pages/createblogpost.action?spaceKey=space but it depends on the context of Confluence which should be avoided.

I would like to make a relative link. And if possible populate the title of the new post with some template.

Thanks in advance.

1 answer

1 accepted

1 vote
David Simpson Community Champion Jan 12, 2012

I can't really guess the use case for this, but a user macro could be the way forward...

Browse to Confluence Admin | Configuration | User Macros

Add a new user macro...

## Macro title: New Blogpost
## Macro has a body: N
## Body processing: n/a
## Output: HTML
##
## Developed by: David Simpson [AppFusions]
## Date created: 2012-01-12
## Installed by: My Name

## This is an example macro
## @param Title:title=Title|type=string|required=true|desc=The blogpost title

#set ( $blogpostTitle = $generalUtil.urlEncode($paramTitle) )
<a href="$req.contextPath/pages/createblogpost.action?spaceKey=$space.key&title=$blogpostTitle ">$paramTitle</a>

Further details: http://minus.com/mKYmU0y0I#1o

Thanks. It worked and gave me a hint to develop macros.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

292 views 11 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you