Hi Reto,

On Jun 2, 2009, at 10:40 AM, Reto Hotz wrote:

> Hi,
>
> On a page I have a html document attached and I link to that document:
> [[Some HTML Document>>attach:[email protected]]]
>
> This is working fine.
>
> But the attached html document is very large and contains a lot of
> anchors for easier navigation inside the document.
> So I'd like to improve the xwiki link to point directly to one of  
> these
> anchors in the html attachment.
> I modified the link:
> [[Some HTML  
> Document>>attach:[email protected]#someanchor]]
>
> But unfortunately this is not working. The hash is always escaped.
>
> Is there a way to link directly to an anchor in an attached html  
> document?

No. Looking at the XWikiDocument API (and more specifically the  
XWikiServletURLFactory API) it's currently not possible to do this.  
It's possible to pass a query string but not an anchor.

I guess this could be added. Could you create a jira issue for this  
improvement request?

Thus right now you'd need to use scripting to call  
$xwiki.getDocument("...").getAttachmentURL(...) and append the anchor  
to the URL.

Thanks
-Vincent

> Importing the html document in the wiki page is not an option, it  
> has to
> be attached.
>
> We're using 1.8.3.
>
> Thanks.
> Reto
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to