I'm trying to use prependTo or appendTo to add items into the user dropdown, but it doesn't work correctly.
in Page_Foot:
<!-- prepend to user dropdown -->
<script type="text/html" class="ew-js-template" data-name="UserDropdownMods" data-method="prependTo" data-target="#change-password" data-seq="11">
<a class="dropdown-item" id="user-profile" data-action="redirect" data-url="./MySettingsList"><?php echo Language()->phrase('ClassActUserMenu_1'); ?></a>
<a class="dropdown-item" id="user-assets" data-action="redirect" data-url="./MyAssetsList"><?php echo Language()->phrase('ClassActUserMenu_2'); ?></a>
<a class="dropdown-item" id="user-docs" data-action="redirect" data-url="./StaffDocumentsView1List"><?php echo Language()->phrase('ClassActUserMenu_3'); ?></a>
</script>
<!-- end prepend to user dropdown -->
The HTML output from that is as follows, which as you can see appends the new items between the <a> and </a> tags of drop down item id 'change-password'. This looks to me to be incorrect behaviour.
<a class="dropdown-item" id="change-password" data-ew-action="redirect" data-url="/changepassword"><a class="dropdown-item" id="user-profile" data-action="redirect" data-url="./MySettingsList">My settings</a>
<a class="dropdown-item" id="user-assets" data-action="redirect" data-url="./MyAssetsList">My assets</a>
<a class="dropdown-item" id="user-docs" data-action="redirect" data-url="./StaffDocumentsView1List">My docs</a>Change Password</a>
What's wrong?
Do I have to replaceAll the entire dropdown?