Report any technical problems you discover and discuss solutions.

How to add a xerte page link through jquery

Plus d'informations
il y a 8 ans 5 mois #4990 par emma_vb
How to add a xerte page link through jquery a été créé par 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?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 8 ans 4 mois #4992 par Fay
Réponse de Fay sur le sujet 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');

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.147 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo