-
Type:
Suggestion
-
Resolution: Low Engagement
-
Component/s: Macros - Create from Template
-
1
If you create a new page from a template, you can use @currentDate to make the new page with the date of today in the title. You can't do that 2x on the same day as the page title is no longer unique the second time.
At my former employer we used Confluence Server and we created a macro that generated the page title from @currentDate ànd the variable $title that we used in Page Properties.
Could we add a similar macro to Confluence Cloud?
The macro was like this:
## @noparams <script> $( "input[name='variableValues.title']" ).change(function(){ console.log($(this).val()); $("form[name='filltemplateform']").find("input[name='title']").val( "$action.dateFormatter.formatGivenString("yyyy-MM-dd", $content.getCreationDate()) - " + $(this).val()) $action.dateFormatter.formatGivenString("yyyy-MM-dd", $content.currentDate) }) </script>
And it was implemented like this:
![]()
And it looked like this:
![]()