Closed lpw25 closed 10 years ago
If each referent has a real URL, we can set the links' @hrefs to that URL and also set a @class of "internal". Then, we can intercept click events on elements matching a[@class="internal"] and decompose the URL/fragment and load that referent in context.
That might work, but then we need to know how convert the real URL into the local URL. For example, a link to Foo.Bar.Baz
may need to become This.Bar.Baz
or This.Baz
depending on whether Foo
or Foo.Bar
was included in This
.
Seems like an include map is needed. If dynamic expansions can introduce new include aliases, dynamic expansions need to append to this include map when they are activated.
This was fixed a while ago: internal links are now rewritten dynamically as they are included
At the moment links do not depend on their context. For example, a link within Std_internal to Std_internal.List will still point to Std_internal.List even when looking at it through Std (which includes Std_internal).
To fix this local links should be treated specially, and should call some JavaScript rather than point to a URL.
This could also be used when following links to components within submodules of the current module, to expand the submodule rather than load it as a page.