Hi Torsten,
On Sat, Nov 3, 2012 at 1:50 AM, Torsten <[email protected]> wrote:
> Hi there,
>
> Although it sounds really easy, I haven't managed to define a Link that,
> when pressed, will stay on the same page but change from VIEW mode
> to the EDIT mode.
>
> I tried this
> [[My Link Text>>$doc.getURL('edit', 'editor=inline')]]
In XWiki 2.0 syntax the link syntax expects either a document
reference (e.g. Space.Page) or an absolute URL
(http://server.com/path). See
http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HXWikiSyntax2.0LinkSpecification
. $doc.getURL(...) returns a relative URL
/xwiki/bin/action/Space/Page?queryString . In XWiki 2.1 syntax the
link syntax has been enhances to support multiple times of link
references. See
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWikiEnterprise34#HChangestothelinksyntaxfromXWikiSyntax2.0
. You can write for instance:
[[Edit this page>>path:$doc.getURL('edit', 'editor=inline')]]
Hope this helps,
Marius
>
> And I tried to switch the $context object with set LinksAction() etc.
> That all does not work as expected. I am currently testing with the
> admin account to make sure that it is not a rights problem.
>
> My solution is based on the FAQ example, i.e. XYZClass, XYZSheet and
> XYZTemplate. It works nice but Iwant to give the user the ability to switch
> easily frpm VIEW mode to EDIT mode while viewing an object. I added the
> above line to XYZSheet. The Link has a questionmark behind it.
> If I click the Link it shows "edit" in the URL but an empty xwiki edior is
> opened instead of the form in EDIT mode.
>
> The work around is currently to access in VIEW mode first and to
> replace "view" by "edit" in the Browser URL field - that works but
> is of course no durable solution.
>
> Any help would be great.
>
> Thanks a lot
> Torsten
>
> p.s. I am using Xwiki enterprise 3.5.1 under Linux with MySQL
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users