External web links in footer

Post here questions and problems related to editing and publishing DITA content.
sure4369
Posts: 6
Joined: Tue Dec 13, 2022 2:25 pm

External web links in footer

Post by sure4369 »

Hi,

I want to publish Link1 text and Link2 text in the footer of my document exactly as shown below. These two texts should redirect to respective external web links that we will define in the CSS.
image.png
Please provide a resolution for this. I am using "DITA Map PDF - based on HTML5 & CSS" scenario.

Thanks
Sure
You do not have the required permissions to view the files attached to this post.
julien_lacour
Posts: 666
Joined: Wed Oct 16, 2019 3:47 pm

Re: External web links in footer

Post by julien_lacour »

Hello,

You can check in our user-guide how to add a link in headers and footers (note there are two methods).
For the display, you can take a look at my answer on this post.

Regards,
Julien
sure4369
Posts: 6
Joined: Tue Dec 13, 2022 2:25 pm

Re: External web links in footer

Post by sure4369 »

I am using this code but only the second one "Turn" is publishing in the output bcz "Turn" is overriding the first one. Am I doing something wrong? sorry in advance if I am doing a silly mistake. I am trying out CSS for a couple of days.

Code: Select all

@page {
  @top-center {
    content: "Link"; -oxy-link: "https://www.oxygenxml.com/" \A;
    content: "Turn"; -oxy-link: "https://www.Google.com/" ;
    color:blue;
  } 
}
Last edited by sure4369 on Wed Dec 14, 2022 12:51 am, edited 1 time in total.
sure4369
Posts: 6
Joined: Tue Dec 13, 2022 2:25 pm

Re: External web links in footer

Post by sure4369 »

Hi Julian,

Thanks for ur suggestion.
Is there any workaround?

Regards,
Sure
julien_lacour
Posts: 666
Joined: Wed Oct 16, 2019 3:47 pm

Re: External web links in footer

Post by julien_lacour »

Hello,

There is a workaround, you can use the SVG method to add two links:

Code: Select all

<svg width="50" height="40" viewBox="0 0 50 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <a xlink:href="https://www.oxygenxml.com/">
        <rect x="0" y="0" width="50" height="20" opacity="0"/>
        <text x="5" y="15" fill="blue">Link</text>
    </a>
    <a xlink:href="https://www.google.com/">
        <rect x="0" y="20" width="50" height="20" opacity="0"/>
        <text x="5" y="35" fill="blue">Turn</text>
    </a>
</svg>
Don't forget to refer the SVG in the page-margin box after that:

Code: Select all

@page {
  @top-center {
    content: url("links.svg");
  }
}
Regards,
Julien
Post Reply