samnaction
samnaction

Reputation: 1254

Getting the site name in alfresco email notification

I am trying to notify users whenever a site is created in alfresco share. I created a rule for the site folder in the repository.

In Define Rule, I selected:

When: Items are created or entered in the folder If all criteria are met: Description contains "a" Perform Action: Send email

But in the message of the email I need to give the site name. For example:

A new site named "Sample" is created. Click the link to join the site.

How can I get the site name and corresponding link to join the site?

Upvotes: 1

Views: 419

Answers (2)

Finn
Finn

Reputation: 952

You can do something like this.

var currentSite = Alfresco.constants.SITE;
var siteObject = siteService.getSite(currentSite );

Upvotes: 1

mitpatoliya
mitpatoliya

Reputation: 2037

If you are using javascript directly to send mail you you will have site object available . You can also try this

siteId = page.url.templateArgs.site;

If you are using ftl you can probably pass sitename from script file to FTL file. You have multiple options to get current site name depending on the context where you are trying to access it.

Upvotes: 0

Related Questions