I have a webviewer that I'm using as a menu across multiple layouts. It works great and was developed on a file hosted on FMS. There was some trickery needed to account for a difference in filepath when accessing internally and externally, but that was handled and it has been working just fine.
But... I recently put the file locally on my computer rather than hosted and of course you can guess that the webviewer links no longer work. What I have currently for each menu item (which sends you to a layout via a script that uses the passed script parameter) is:
<a href="FMP://" & Substitute ( ( Middle ( Get ( FilePath ) ; 8 ; 500 ) ) ; "/110" ; "" ) & "?script=GEN:MenuNavigation¶m=Organizations"><img src="data:image/png;base64," & Base64Encode ( ZRE_Resources::MenuIconOrganizations ) &"" align="middle"&""/> ORGANIZATIONS</a>
The section we're interested in is highlighted in bold. As I say, on a hosted file this works great. Now I see in FMP13.0v2 they allow for local files to be referenced in a FMP:// hyperlink (http://help.filemaker.com/app/answers/detail/a_id/13313), but I can't get it to work. It keeps saying it can't find the file, even when the path it lists appears to be the correct path - that said, the file is already open so it shouldn't be trying to open a new file anyway.
What I want to have is something like:
<a href="FMP://" & If ( Left ( Get ( FilePath ) ; 5 ) = "fmnet" ; "FMP://" & Substitute ( ( Middle ( Get ( FilePath ) ; 8 ; 500 ) ) ; "/110" ; "" ) ; "fmp://" & Middle ( Get ( FilePath ) ; 8 ; 500 ) ) & "?script=GEN:MenuNavigation¶m=Organizations">
where I'm testing if the file is hosted and supplying the hosted hyperlink version and if not then supplying the local hyperlink version.
Anyone had any success is making this new functionality work and an idea on what I might be doing wrong?
Thanks as always.