Has anyone found a way to add links to the text in the Introductions widget?
We’d be interested in using this and replacing our current use of quick links but can’t seem to figure out a way to do this.
Has anyone found a way to add links to the text in the Introductions widget?
We’d be interested in using this and replacing our current use of quick links but can’t seem to figure out a way to do this.
@Scott Baldwin I can help you here I think.
There are 2 main ways to tackle this:
The way I would tackle it (option 2) would be by copying the existing code for that section:
<div class="homepage-widget-container widget-container homepage-widget-container--introduction_bar widget-container--introduction_bar homepage-widget-container--introduction_bar widget-container--introduction_bar homepage-widget-container--index-5 widget-container--index-5" data-idx="5">
<div class="widget-placeholder">
<div data-preact="widget-introduction-bar/index" class="" data-props="{"phrases":{"Forum":{"branded.cta.intro.first":"Find answers to your questions","branded.cta.intro.second":"Stay up to date on the latest topics","branded.cta.intro.third":"Ask questions and help others","Ask your question":"Ask your question"}}}"><section class="full-width Template-brand-cta is-transition--height custom-intro-bar" data-component="close-element" data-data="{"storageName":"close--widget-cta","parent":".Template-brand-cta"}"><div class="cta-widget qa-cta-widget"><div class="sitewidth"><span class="icon icon--cross icon--auto-width close js-close--element" aria-hidden="true"></span><div class="col"><div class="box widget widget--cta"><div class="box__content box__pad"><ul class="list list--float"><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span>Find answers to your questions</span></div></li><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span>Stay up to date on the latest topics</span></div></li><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span>Ask questions and help others</span></div></li></ul><a href="/topic/new" data-track="{"trigger":"widget","type":"Topic Initiated"}" data-ga-track="{"eventCategory":"Homepage","eventAction":"Create topic clicked","eventLabel":{"Position":"Introduction widget"}}" class="btn--cta btn--new-topic qa-topic-new-button">Ask your question</a></div></div> </div></div></div></section></div>
</div>
</div>
Then I’d add an HTML Widget without title in which I paste that same code:
Then I would proceed to add the links I want to have appear in that section, and remove the extra space of the html widget so that it looks exactly like the original one:
The code would the look something like this:
<div id="noobContent" style="margin-top: -35px !important;" class="homepage-widget-container widget-container homepage-widget-container--introduction_bar widget-container--introduction_bar homepage-widget-container--introduction_bar widget-container--introduction_bar homepage-widget-container--index-5 widget-container--index-5" data-idx="5">
<div class="widget-placeholder">
<div data-preact="widget-introduction-bar/index" class="" data-props="{"phrases":{"Forum":{"branded.cta.intro.first":"Find answers to your questions","branded.cta.intro.second":"Stay up to date on the latest topics","branded.cta.intro.third":"Ask questions and help others","Ask your question":"Ask your question"}}}"><section class="full-width Template-brand-cta is-transition--height custom-intro-bar" data-component="close-element" data-data="{"storageName":"close--widget-cta","parent":".Template-brand-cta"}"><div class="cta-widget qa-cta-widget"><div class="sitewidth"><span class="icon icon--cross icon--auto-width close js-close--element" aria-hidden="true"></span><div class="col"><div class="box widget widget--cta"><div class="box__content box__pad"><ul class="list list--float"><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span><a style="color: inherit;" href="http://www.google.com">Find answers to your questions</a></span></div></li><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span>Stay up to date on the latest topics</span></div></li><li class="list__item"><span class="icon icon--replace icon--round icon--checkmark" aria-hidden="true"></span><div class="list--label"><span>Ask questions and help others</span></div></li></ul><a href="/topic/new" data-track="{"trigger":"widget","type":"Topic Initiated"}" data-ga-track="{"eventCategory":"Homepage","eventAction":"Create topic clicked","eventLabel":{"Position":"Introduction widget"}}" class="btn--cta btn--new-topic qa-topic-new-button">Ask your question</a></div></div> </div></div></div></section></div>
</div>
</div>
Edits:
Obviously you can then remove the original Introduction Widget and set the url in the code to whatever you want and follow the same logic for the other bullet-points as needed. Note: If you are pointing outside of your community then you can add target="_blank" in the “a” element in order for the link to open in a new tab.
BTW for extra points… (Based on the screen-grab you shared). Now this is a custom HTML widget you could even add an ID to the initial div element like “noobContent” and then have the content disappear for more advanced members based on rank for example.
<script>
var noobSidebarElement = document.getElementById("noobContent");
if (inSidedData.user.rank !== "RANKHERE") {
noobSidebarElement.setAttribute('style', 'display:none;'); }
}
</script>
Just put this code into the last box on the Third Party Script page after adding the rank number you want to display this to in the rule where it says RANKHERE. and boom!
Hope this helps!
Many thanks
We have done this with HTML. So instead of:
your phrase says:
It’s now working on our site:
@Scott Baldwin
With regards to not being able to edit the phrase I think you will find - at least it was my experience - that if you go to Control > Customisation > Phrases that all the HTML edits you make from there support HTML while editing from the front end by turning on the Phrases toggle is actually less consistent, and often display the code you wrote instead of it being properly interpreted as code. This should help if you need to make edits to this!
Hey
I’m also looking to edit the hyper links on the introduction bar. I’ve added the code here, but I cannot get it down the page (where the current bar is) it is staying at the top if I put the script in the head, and at the bottom if I put the script under the body. Any suggestions what I’m doing wrong here?
I love this thread about seizing another ‘Onboarding’ opportunity.
Have you thought about proposing this as an OOTB option for the widget, like the Featured content or announcement widgets @Scott Baldwin ?
Hey
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.