Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

How to add a xerte page link through jquery 6 years 1 month ago #4990

  • emma_vb
  • emma_vb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

How to add a xerte page link through jquery 6 years 1 month ago #4992

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 235
  • Thank you received: 87
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:
<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:
$("#pageDiv").append('View the <a href="#" onclick="x_navigateToPage(false,{type:'linkID',ID:'PG1520436539997'}); return false;">Resources page</a> for more information');

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.047 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search