1 Reply Latest reply on Jul 18, 2011 3:24 PM by TSDuck

    Link directly to layout

    ReggieSlack

      Title

      Link directly to layout

      Your post

      If I am using Instant Web Publishing is there a way for me to give a URL to user that will take them directly to a specific layout? 

        • 1. Re: Link directly to layout
          TSDuck

          Hi Reggie Slack:

          Thanks for posting.

          Instant web publishing allows you to link to the default home page or to a specific database.  You cannot specify a URL that links to a specific layout within a database though.

          If you want to link to a specific database, you can modify the URL to do so.  Normally, your URL will look like the following.

          http://<IP address>:<Port number>/fmi/iwp

          This URL bring you to the default IWP page listing your hosted databases.  You can then be more specific and add the database name in the URL address. Below is an example of what the URL will look like.

          http://<IP address>:<Port number>/fmi/iwp/cgi?-db=<database name>&-loadframes

          Replace <database name> with the name of your database.  The URL would change to the following if your database was called inventory.

          http://<IP address>:<Port number>/fmi/iwp/cgi?-db=inventory&-loadframes

          Using this URL setup, a client can now go directly to a specific database. 

          What you can do next is add buttons on the main layout which go to other layouts.  In your database, under the scripts menu choose manage scripts.  Click new to add a new script, and in this script use the script step called Go to Layout.  The script step will allow you to specify one of your layouts for the script to navigate to.  Name the script layout_script and use save under the file menu.  Under the edit menu, go to layout mode.  In layout mode, select the insert menu and choose the button option.  From the button setup window, select perform script, then choose the script called layout_script and click ok twice.  Name your button after the layout name, so users will now which layout the button goes to.  Now in instant web publishing, users can simply click a button to navigate between layouts easily.  You can use the steps above to buttons for each layout in your database on your main layout.

          Another option is setting a start up script for instant web publishing users.  The start up script can detect a web user, then direct them to a specific layout.  In the scripts menu, go to manage scripts.  In a new script, you can use the following example to detect if a web user is logging in.  This would then go to the specified layout.

          If [ PatternCount ( Get ( ApplicationVersion ) ; "Web" ) ]

          Go to Layout [“layout_name”}

          End If

          Under the file menu, go to file options and check off perform script under “When opening this file.”  Select the script you created above and click ok.  Web users will now get directed to the layout you specified when they log in.

          TSDuck

          FileMaker, Inc.