-
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
-
External issue URL:
-
Change Log Message:Fixes wrong current template used inside ajax requests
-
Story Points:1
-
External issue ID:1173
-
Copy Issue Key:
-
Patch Instructions:
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>
- mentioned in
-
Wiki Page Loading...