Appending to Preferences -> Account tab

Hello,

I’ve started to use SSO for my forum. I’d like to add some links to the Account tab under Preferences so that I can tell users that they can manage further settings re. their account on the SSO dashboard.

I can see how to do this, but it involves overwriting one of the templates, which will mean that I will need to maintain Discourse downstream. Is there a plugin approach to push a div on to this section trivially?

diff --git a/app/assets/javascripts/discourse/templates/preferences/account.hbs b/app/assets/javascripts/discourse/templates/preferences/account.hbs
index 239c8d0..ca21e45 100644
--- a/app/assets/javascripts/discourse/templates/preferences/account.hbs
+++ b/app/assets/javascripts/discourse/templates/preferences/account.hbs
@@ -99,6 +99,10 @@
   </div>
 </div>
 
+<div>
+<h2>Your Account</h2>
+<p>To manage your account further, see...</p>
+</div>
 
 {{#if model.canDeleteAccount}}
   <div class="control-group delete-account">

I do apologise if this has been covered before

Cheers

Sam

You can override templates using a theme. You can find the example here.

8 Likes

Thank you for the tip