V4 Magazine Skin - Direct access via context ID

This forum is for discussions on the Help & Manual Premium Pack and the Premium Pack Toolbox configuration utility introduced with Premium Pack 3

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Martin Krimmel
Posts: 15
Joined: Wed Dec 11, 2019 3:47 pm
Location: Germany
Contact:

V4 Magazine Skin - Direct access via context ID

Unread post by Martin Krimmel »

Hi y'all,

We have experimented with our PP4 Magazine-themed help and tried to directly access an individual page using a URL parameter for the context id like http://packages.dvelop-ls.de/learn/webh ... =237812817.

However this initially displays the magazine tiles which then disappears after a few second. Then the referenced topic is only highlighted in the TOC but the page content itself is not displayed.

Are we missing anything here?

Can we skip the initial display of the magazine tiles altogether and directly see the page content with such a call?

Thanks for any suggestions.

Regards
Martin
Martin Krimmel
Technical Writer/Translator
d.velop Life Sciences GmbH
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: V4 Magazine Skin - Direct access via context ID

Unread post by Tim Green »

Hi Martin,

Thanks for posting this. It's a small script bug in the magazine skins that only triggers when you are using a context ID. A fix will be included in the next update, but if you are already using 4.0.4 you can fix it yourself as follows:

Edit the hm_webhelp.js file in the skin baggage and locate the following piece of code on line 2078:

Code: Select all

if (!hmDevice.phone && window.fetchmagazine.mag > -1) {
Replace it with this:

Code: Select all

if (!hmDevice.phone && window.fetchmagazine.mag > -1 && window.fetchmagazine.mag < hmWebHelp.magObject.pages.length) {
Be very careful to include the curly bracket ({) at the end of the line, otherwise nothing will work.

On balance, however, the magazine skins aren't really ideal for opening with URLs, since the user will only ever see a single chapter. They are more suited to manual access, when the user starts with the magazine page. This is why the magazine is always displayed folding away when a topic is opened from a URL, so that the user is reminded that it is there. :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Krimmel
Posts: 15
Joined: Wed Dec 11, 2019 3:47 pm
Location: Germany
Contact:

Re: V4 Magazine Skin - Direct access via context ID

Unread post by Martin Krimmel »

Hi Tim,

thanks for the quick reply. Since I am, by trade, not much a of a developer myself, please excuse my technically naive question here. ;-)

If I understand your code-fix correctly, you are referring to a viewing on a phone only here with "if (!hmdevice.phone...)".

However, the issue occurred in a view embedded in a software GUI on a desktop machine.

Does this fix apply to all devices, nevertheless?

Best regards
Martin
Last edited by Martin Krimmel on Mon Oct 26, 2020 12:06 pm, edited 1 time in total.
Martin Krimmel
Technical Writer/Translator
d.velop Life Sciences GmbH
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: V4 Magazine Skin - Direct access via context ID

Unread post by Tim Green »

Hi Martin,

Not to worry, the ! means "not" so the condition is for when it is NOT on a phone. The problem doesn't arise at all on phones, because the magazine can't be displayed there. 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Martin Krimmel
Posts: 15
Joined: Wed Dec 11, 2019 3:47 pm
Location: Germany
Contact:

Re: V4 Magazine Skin - Direct access via context ID

Unread post by Martin Krimmel »

Hi Tim,

thanks, again. Silly me, if I had properly put on my reading glasses this would probably have prevented this question. Thanks!
Now it totally makes sense.

Regards
Martin
Martin Krimmel
Technical Writer/Translator
d.velop Life Sciences GmbH
Post Reply