Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pass variable to page title using HTML include macro

Nicky October 8, 2020

Hi,

I've seen a few discussions on how to pass template variable to the template page title by creating a user macro.  

I do not have access to create a user macro and so my only option is to use an HTML include macro.

I'd like to pass a template variable to the template page title so that when creating a new page via the custom template, the page title is automatically populated based on the template variable value.

This is the code I tried using in the HTML include macro, but it doesn't pass the value to the page title (I got this after exploring other discussions).

<script>

$("input[name='variableValues.myCustomVariable']").change(function(){ console.log($(this).val()); $("form[name='filltemplateform']").find("input[name='title']").val($(this).val()) })

</script>

Any help is greatly appreciated.

Thanks.

N

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events