Change link signup CTA

There might be more efficient ways to do this

but… one is to modify the template.

The template lives at:

https://github.com/discourse/discourse/blob/081959227de72c7473d36618bb02ddea3e42ebcd/app/assets/javascripts/discourse/templates/components/signup-cta.hbs

And to override it you can change

{{d-button action="showCreateAccount" label="signup_cta.sign_up" icon="check" class="btn-primary"}}

To something like:

<a href="https://foo.bar" target="_blank">Sign up</a>

In the following:

<script type="text/x-handlebars" data-template-name="components/signup-cta">
	<div class="signup-cta alert alert-info">
		{{#if session.hideSignupCta}}
			<p>
				{{i18n "signup_cta.hidden_for_session"}}
			</p>
		{{else}}
			<p>{{replace-emoji (i18n "signup_cta.intro")}}</p>
			<p>{{replace-emoji (i18n "signup_cta.value_prop")}}</p>

			<div class="buttons">
				{{d-button action="showCreateAccount" label="signup_cta.sign_up" icon="check" class="btn-primary"}}
				{{d-button action="hideForSession" label="signup_cta.hide_session" class="no-icon"}}
				<a {{action "neverShow"}}>{{i18n "signup_cta.hide_forever"}}</a>
			</div>
		{{/if}}
		<div class="clearfix"></div>
	</div>
</script>

And then add it to the </head> section of a theme.

Let me know if you need more help.

2 Likes