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.9k points)
Thank you very much Myra Ferguson,

But how do I do it?

Where can I find information?

I am not able to make the change.

Could you help me? Thank you very much again.

Try using the target attribute for the iframe. You'll find more information about using a target from the link at the bottom of that article (see "Iframe - Target for a Link" on this page):

Thank you very much. It works perfectly.
Let's complicate the situation :-) and if the page that contains the iframe and the links are separated: For example: I send a mass email.

In this case, the publication opens in in5 on a full page and the requested page but on a full screen, not embedded in the blog.

For example, here are the links (this page is the mass email): https://axoncomunicacion.es/masivos/axon/unomas113/index_con_url_modificadas.html

And here is the iframe:

https://axoncomunicacion.net/portfolio/uno-mas/no113-uno-mas/no113-uno-mas/

Can I make it open on the destination page for the requested page?

Thank you very much again and sorry for so many questions
That's great! You're very welcome. :)

If I understand your question, you can add a link to an email that goes directly to a specific page the same way you have your links set up on https://axoncomunicacion.es/masivos/axon/unomas113/index_con_url_modificadas.html using that same syntax:

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

Thank you very much, I'll explain it to you in another way.

Forget that it's a mass format, so we don't get confused.

If the link and the iframe are not on the same page, the InDesign document opens in full screen, not in its iframe frame.

If on this page:

https://axoncomunicacion.es/masivos/axon/unomas113/index_con_url_modificadas.html

you open any link, you will see the InDesign document on a specific page (that's correct) but it appears as a full page, not in its iframe.

What I need is for this page to open:

https://axoncomunicacion.net/portfolio/uno-mas/no113-uno-mas/no113-uno-mas/

and for a specific page of the InDesign document to be displayed in the iframe where the In5 document is.

Do you understand me better now?

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. :)