Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Imported Fromfrom: http://groups.google.com/group/in-portal-dev/browse_thread/thread/40b20b5037d02cea#

In-Portal uses *<inp2:m_Link .../> * 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">
 $

Code Block
languagejavascript
titleJavaScript (old code)
$('#target-div').load( '<inp2:m_Link

...

 template="path/to/ajax/template"

...

 no_amp="1" js_escape="1"/>' );

</script>
then within "path/to/ajax/template" template current template will now be "
path/to/ajax/template" instead of template used to display the page that
made 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">

Code Block
languagejavascript
titleJavaScript (new code)
$('#target-div').load( '<inp2:m_Link

...

 render_template="path/to/ajax/template"

...

 no_amp="1" js_escape="1"/>' );

</script>
Task: links_inside_ajax_template_fix.patch

Related Tasks

Jira Legacy
serverIn-Portal Issue Tracker
keyINP-953

Ready for testing.

--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com