Report any technical problems you discover and discuss solutions.

How to add a xerte page link through jquery

  • emma_vb
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
8 jaren 5 maanden geleden #4990 door emma_vb
Hi - apologies if this is the wrong category - but I am trying to add a xerte page link through jquery and I'm not sure how to do it. Any pointers?

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
8 jaren 4 maanden geleden #4992 door Fay
Beantwoord door Fay in topic How to add a xerte page link through jquery
Hi Emma

Using the Xerte page link button in the WYSIWYG toolbar, create a Xerte page link on any page. Then swap to source view to view the HTML tags (there's a button in the WYSIWYG toolbar to swap views).

You will see the html for the link & it should look something like this:
Code:
<a href="#" onclick="x_navigateToPage(false,{type:'linkID',ID:'PG1520436539997'}); return false;">Resources</a>

Copy all of the <a> tag

You can then use this format of link in your jQuery. For example if you are trying to insert some text including the page link somewhere you could use something along these lines:
Code:
$("#pageDiv").append('View the <a href="#" onclick="x_navigateToPage(false,{type:'linkID',ID:'PG1520436539997'}); return false;">Resources page</a> for more information');

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

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