Skip to main content

How do links work in an iframed comslider

  • March 2, 2023
  • 8 replies
  • 80 views

lrodman
Guide II
Forum|alt.badge.img+6

Hello,

 

If we iframe a comslider in as an html widget on our homepage, and a user clicks a link in that comslider, can we make it navigate the whole “master” docebo page? Or do all comslider links have to be “new window” or “in iframe”.

 

Here is an example of where the comslider would go - replacing that “limitless” banner.

 

8 replies

lrnlab
Hero III
Forum|alt.badge.img+10
  • Hero III
  • March 2, 2023

my guess is you can point to anywhere on the site...I only used the free version as a test so the links didn't work.


lrodman
Guide II
Forum|alt.badge.img+6
  • Author
  • Guide II
  • March 2, 2023

Sorry - link targets

If I have a link with target=_self, will it open in the iframe?


lrnlab
Hero III
Forum|alt.badge.img+10
  • Hero III
  • March 2, 2023

hmm good question...I would test it but my guess is yes if it’s in an iFrame. if I recall, consolider has 2 options for embedding the code...1 in an iframe and the other in HTML...maybe you can try that instead?


lrodman
Guide II
Forum|alt.badge.img+6
  • Author
  • Guide II
  • March 2, 2023

hmm good question...I would test it but my guess is yes if it’s in an iFrame. if I recall, consolider has 2 options for embedding the code...1 in an iframe and the other in HTML...maybe you can try that instead?

Yep will try - my guess is any sort of HTML that is fancy, docebo will strip to the bone.


lrnlab
Hero III
Forum|alt.badge.img+10
  • Hero III
  • March 2, 2023

very likely 🙄


lrodman
Guide II
Forum|alt.badge.img+6
  • Author
  • Guide II
  • March 2, 2023

very likely 🙄

How about some of these targets:

A target attribute with the value of “_parent” opens the linked document in the parent frame.

	<a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>

A target attribute with the value of “_top” opens the linked document in the full body of the window.

	<a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>

A target attribute with the value of framename opens the linked document in a specified named frame.

	<a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>

lrnlab
Hero III
Forum|alt.badge.img+10
  • Hero III
  • March 2, 2023

does the “_self” not work? or are you trying to get that open outside the iFrame? If yes to the latter, then I would think the either of the first 2 could work


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • March 3, 2023

I havnt used them in comslider, but in a lot of other iframes and the link targets all work as expected. The one thing to be aware of is if you are trying to use them to nav to like an anchor tag on the destination page, this can be weird on working consistently in docebo depending on your setup.