Embed Page

Smartsite 7.7 - ...

Using the embed page action, an application page can be embedded in a manager tab.

Action parameter

Name

Required Release From Description
URL Yes 7.7 URL relative to the WWWMgr folder where the embedded page is located.

Javascript

To allow interaction with the manager workspace/shell, browsers require the host to be the same for the application page and the manager. In that case, the manager context is available in window.top. In the example below, clicking either of the buttons synchronizes the tree to the given item and then submits the form. The onsubmit handler opens a new tab and posts the data to the newly opened tab.

The value of the uws_newtab input determines the action code to be started. The prefix "actionparam-" allows you to pass arbitrary parameters to the action.

<html>
  <head>
    <title>Actie!</title>
    <script type="text/javascript">
    function synctree(item){
      top.shell.GetContentTree().JumpTo(item);
    }

    function frmsubmit(form){
      var newTab = top.uws.addTab(false);
      form.target = newTab;
    }
    </script>
  </head>
  <body>
    <h1>Test page</h1>
    <form method="post" action="/cms.net" onsubmit="frmsubmit(this)">
      <input type="hidden" name="uws_newtab" value="mgr-EDITITEM" />
      <button type="submit" value="123" name="actionparam-nr" onclick="synctree(this.value);">Edit page 123</button>
      <button type="submit" value="345" name="actionparam-nr" onclick="synctree(this.value);">Edit page 345</button>
    </form>
  </body>
</html>

Smartsite 7.8 introduces new functionality for the embed page action. 

  • Any action parameters other than "url" will now be passed to the embedded page as query string parameters.
  • When the embedded page posts a value "subactionresult", this will be passed as a result to the parent action in the tab.