Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-953

Wrong template on templates loaded via AJAX requests

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.3
    • Fix Version/s: 5.2.0-B1
    • Component/s: Template System
    • Labels:
      None

      Description

      In-Portal uses [b]<inp2:m_Link .../>[/b] tag to build links to this/other pages of website.

      When:

      • template is not specified, then link to current page will be created;
      • template is specified, then link to given page will be created.

      However, when parts of a page are loaded via ajax requests, e.g.

      <script type="text/javascript">
      $('#target-div').load( '<inp2:m_Link [b]template="path/to/ajax/template"[/b] no_amp="1" js_escape="1"/>' );
      </script>

      then within "[b]path/to/ajax/template[/b]" template current template will now be "[b]path/to/ajax/template[/b]" instead of template used to display the page that made that ajax request.

      Attached patch solves this problem allowing to specify alternative template, that should be used by template parser to display page content. Fixed version of JavaScript code from example above now will look like:

      <script type="text/javascript">
      $('#target-div').load( '<inp2:m_Link [b]render_template="path/to/ajax/template"[/b] no_amp="1" js_escape="1"/>' );
      </script>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: