How do I add labels using Linking plugin when creating News?
I've tried to find a way to add a label on the New page from a button that I create with the linking plugin. I know {add-page} and {link-page} only create pages (those have label params). So the only way I can create a News feed from a button is to use {link-to}. So I can link-to the "Add News", but can't define a label in that.
However, the {blog-post} macro that reads all of the news feeds from the SPACE has a 'labels' parameter in case I wanted to narrow down my news to only particular topics.Anybody see what I am getting at? I don't expect the end-user to have to know what the exact label they need to add for each of the 3 types of News on the Space in order to make it index in the appropriate {blog-posts} macro on the page.
Since I am not calling a template, I can not have an {add-label} on the News page.
Looking for Ideas here....
However, the {blog-post} macro that reads all of the news feeds from the SPACE has a 'labels' parameter in case I wanted to narrow down my news to only particular topics.Anybody see what I am getting at? I don't expect the end-user to have to know what the exact label they need to add for each of the 3 types of News on the Space in order to make it index in the appropriate {blog-posts} macro on the page.
Since I am not calling a template, I can not have an {add-label} on the News page.
Looking for Ideas here....
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Unfortunately I can't think of a good option either. We need a similar macro to {add-page} for {add-news}, which would allow setting labels. Or, support for templates in news. Neither exist currently.
Create a feature request for a {add-news} macro and I'll schedule it. Adding that macro shouldn't be too hard, although I'll have to investigate to see if adding labels will be so simple. Depends on the setup of the 'createblogpost.action' page...
1 person says
this answers the question
-
Inappropriate?I'm using this macro, titled "addpostbylabel":
#set ($wikibaseurl = "${req.getContextPath()}")
$body
Than, if you want to create news with labels for example "sun" and "moon" you provide:
{addpostbylabel:sun, moon}Add news{addpostbylabel} -
Inappropriate?Thanks David for the quick answer. I'll open that feature request now.
Also, tomash, nice reply as well. I am not 100% sure what yours does. Is that a macro that executes on a news page that adds a label to it? If so, may not work in our case because I would have to have that execute in the back-end (so the user doesn't have to execute it), meaning it would have to be on a template (which currently isn't possible for news posts).
Does your addpostbylabel macro create a new News page and append the label automatically? Even without templates, that could prove useful in the short-term? Let me know. Thanks again.
I’m amused
Loading Profile...



EMPLOYEE
