Best Answer

Internal/Bookmark Links not working


I’m attempting to create a link at the top of the page that will link down the page to a course catalog at the bottom of the page. Instead the link goes back to the homepage. I can’t quite figure out why this is and I can only assume its some kind of code in Docebo that’s causing the issue. Does anyone know why the code here wouldn’t work?

<a href="#cataland"><img src="https://d36spl5w3z9i0o.cloudfront.net/files/g/e/genesyssandbox_docebosaas_com/userfiles/562892/PDS/catalog_leap.png" alt="Click here to go to the catalog" width="5792" height="468" /></a>

<!--Other Content Here-->

<div id="cataland"><img src="https://d36spl5w3z9i0o.cloudfront.net/files/g/e/genesyssandbox_docebosaas_com/userfiles/562892/PDS/catalog_land.png" alt="Partner Digital Catalog" width="5792" height="468" /></div>

The code appears to work in other editors.

icon

Best answer by pmo 8 July 2022, 22:47

View original

8 replies

Userlevel 7
Badge +2

Are you trying to link to a point in the page or to the catalog itself? It’s the latter I’m just curious what you’re doing with that URL vs using the standard LMS url location of the catalog itself? 

I’m linking to a point on the page.

I’m not linking out to the catalog itself. I’m just the designer. The people who administrate the content determined that linking out to the catalog on its own page was a problem for reasons I didn’t understand well enough to articulate here.

Regardless of what I’m linking to, I need the link at the top to send the user to the bottom. It only isn’t working in Docebo and I cannot figure out why. The link out and the bookmark are in different WYSIWYG modules. I don’t believe that should be a problem but maybe its worth mentioning.

Userlevel 7
Badge +2

I misread your original code and see what you’re trying to do now. I’m not sure if it’s possible the way you’re approaching it since the URL that’s built afterwards is www.customdomain.com/#cataland and that’s not a valid page URL format. 

I think you’d have to add the rest of the URL and then reference the doc widget ID of the HTML widget and not the div ID you’ve assigned within the widget. 

 

Userlevel 7
Badge +2

Apologies I’m probably going to stumble through this as I’m not really a designer and more of an LMS mcguyver if you will. 

So if you’re trying to link to a specific ID you would need structure the link as such: 

www.yourcustomdomain.com/pages/31/browse-all-skills-courses#doc-widget-163


The #doc-widget-163 is the widget ID. 

Userlevel 7
Badge +2

Actually I think you can reference the assigned div ID.

So in your instance something like: 

href="pages/31/browse-all-skills-courses#cataland" 

With 31 being the page id and then “browse-all-skills-course” being the name of the page. 

Userlevel 7
Badge +7

Actually I think you can reference the assigned div ID.

So in your instance something like: 

href="pages/31/browse-all-skills-courses#cataland" 

With 31 being the page id and then “browse-all-skills-course” being the name of the page. 

Just learned something there….woot woot.

Actually I think you can reference the assigned div ID.

So in your instance something like: 

href="pages/31/browse-all-skills-courses#cataland" 

With 31 being the page id and then “browse-all-skills-course” being the name of the page. 

 

This fixed it! I’d love some insight as to why this worked. It’s my understanding that if you are bookmarking to the same page, the relative URL isn’t necessary. However, it was necessary here. Are you able to shed any light on why this is the case here and not elsewhere? If not that’s okay! I’m just trying to learn as much about coding in Docebo as I can.

Userlevel 7
Badge +2

@natticatt I’ll try to do some digging but I don’t know why off the top of my head. 

Reply