Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes

Hello,

I am trying to show (link 1), on a wordpress page, a summary and that each section has a link so that that page is shown in the lower iframe where the magazine is.

I have added the javascript code for link 2.

The thing is that it is not shown in the lower iframe. When I click on it, the requested page opens in full screen.

The index links have this form:

https://axoncomunicacion.net/wp-content/uploads/in5-archives/cv117web/cv117web/index.html#p=17

Can the requested page be shown in the lower iframe according to the menu?

How is it done?

Thank you very much,

P.S.: sorry for my level of English

Links:

1: https://axoncomunicacion.net/portfolio/pruebas-de-link-interno/#

2: https://ajar.freshdesk.com/support/solutions/articles/26000055864-create-deep-links-to-content-created-using-indesign-in5?ck_subscriber_id=1551714196&utm_source=convertkit&utm_medium=email&utm_campaign=Create%20deep%20links%20to%20content%20created%20using%20InDesign%20&%20in5%20-%2014006173

in how_to by (170 points)
  

1 Answer

0 votes
You are using the correct JavaScript from the article; however, it works in the specific case where there is only one iframe on the page. I can see that the WordPress page has more than one iframe, so you would need to target each iframe specifically and modify the script or remove the other iframe.
by (29.7k points)

Use the function in the article (toward the bottom of the Deep linking to page added to a WordPress site section) to share a link that not only goes to your URL but also loads the desired page from the iframe.

I don't understand you.

Can you explain it to me again, please?

The article, Create deep links to content created using InDesign & in5, describes multiple approaches for creating deep links. Which approach you use is based on different scenarios such as where the content is hosted, if it's embedded, or if there are more than 1 iframe on the page. 

It appears that you have presented some different scenarios. You would need to use the approach that goes with its corresponding scenario.

In the most recent scenario that you presented, you would need to use the following approach from the article:

To be able to share a link that would open the website but also load a specific page in the iframe as the first page, add the following code to the JavaScript portion of the Resources section of the Export HTML5 with in5 dialog:

function getHashPage(){
    var q=(location.hash || parent.location.hash).substr(1),px=q.indexOf('p=');
    return px>-1?parseInt(q.substr(px+2))||-1:-1;
}

With this function, adding the hash parameter to the top URL will load page 3 of the document in the iframe. 

https://example.com#p=3

(The above script and URL work when there is only one iframe on the page.)

If you're having trouble creating deep links, then I would recommend working with a web developer. 

Muchas gracias,
I'm glad I could help. :)