The place for more technical questions for those who want to create new pagetypes or bespoke functionality.

Fragment identifiers and scroll functions

  • Neil Pollock
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
9 jaren 1 maand geleden #4578 door Neil Pollock
Fragment identifiers and scroll functions werd gestart door Neil Pollock
I am using a scroll function in a bootstrap template to show a full page title screen for different sections. You can see this here:

xerte.cardiff.ac.uk/play_5683

However, if I give the link to a specific page the scroll function no longer works. For example:

xerte.cardiff.ac.uk/play_5683#page4

Does anyone have an idea why this would be?

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
9 jaren 1 maand geleden #4585 door Fay
Beantwoord door Fay in topic Fragment identifiers and scroll functions
Hi Neil

Where have you put the code that controls the way that you want those titles screens to work (the code that makes it full screen but then shrinks it as you scroll down)?

Is it in one of the sections on the first page? If so then this won't have loaded when skipping directly to a later page so your title page won't work as expected.

There is a script optional property at LO level (click on 1st item in page tree where you've entered your LO title & add 'Script' optional property here). It may better when added here

Fay

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
9 jaren 1 maand geleden #4586 door Fay
Beantwoord door Fay in topic Fragment identifiers and scroll functions
Just thought - I think the LO level Script optional property might be a reasonably recent addition so if you don't have the option to add it here you might have to have the script in your 1st page duplicated on all subsequent pages to make sure it works when navigating directly to a page.

I hope this helps
Fay
De volgende gebruiker (s) zei dank u: Neil Pollock

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • Neil Pollock
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
9 jaren 1 maand geleden #4587 door Neil Pollock
Beantwoord door Neil Pollock in topic Fragment identifiers and scroll functions
Thanks for this, Fay.

The problem was indeed that I had the script on the first page and it wasn't being loaded (and as soon as you said it it seemed so obvious!).

I don't seem to have the script optional property at LO level yet, so I've just copied it across to the other pages as necessary.

Thanks.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: JohnSmith
Tijd voor maken pagina: 0.180 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo