Re: [xwiki-users] Default editing mode for page with object/sheet

2012-11-27 Thread Ryszard Łach
Thanks, it's very helpful.

Cheers,

R.
On 11/27/12 08:47, Marius Dumitru Florea wrote:
>
> You can't and I don't see why you would need to edit in Wiki or
> WYSIWYG mode those pages. Once you add an object with a sheet to a
> page you basically make that page a structured page and thus the user
> needs to edit the structured data when he clicks Edit. It's not a
> plain wiki page any more.
>
> Now, you may want to still use the page content and title to store
> some data besides the structured data from the attached object, which
> is possible and easy to do. You just need to add the content and title
> fields to your sheet, at least in edit mode. You can start with:
>
> {{velocity}}
> ; Title
> : {{html}} value="$escapetool.xml($tdoc.title)"/>{{/html}}
> ; Content
> : {{html}}$xwiki.getTextArea($tdoc.content){{/html}}
> {{/velocity}}
>
> For a more advanced display see the AppWithinMinutes.Title and
> AppWithinMinutes.Content pages from XE 4.3 (or on
> https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-ui/src/main/resources/AppWithinMinutes)
>
> Hope helps,
> Marius
>
>> TIA
>>
>> R.
>>
>> ___
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users


-- 
jabber: ryszard.l...@jabber.contium.pl
skype: ryszard.lach.contium
CONTIUM S.A. http://www.contium.pl
tel.: (71) 35 84 112
sekretariat: (71) 35 84 100
tel. kom: +48 502 724 115
GPG Key ID: 0x05792F34


___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Default editing mode for page with object/sheet

2012-11-26 Thread Marius Dumitru Florea
On Tue, Nov 27, 2012 at 12:15 AM, Ryszard Łach  wrote:
> Hi.
>
> I've created something similar to FAQ application: a simple class,
> sheet, template and pages created from template.
>

> The pages are including the sheet, also have an object of the class.

You should use 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module#HClasssheets
instead.

>
> I don't understand why the default edit mode is 'inline form', i.e. when
> I create a livetable with 'actions' column, than 'edit' button goes to
> 'inline form' edit mode.
> If a wiki user does not have 'advanced mode' enabled - he can only edit
> the form, not the page itself.
>

> How to make 'wiki' or 'wysiwyg' edit mode as default for such pages?

You can't and I don't see why you would need to edit in Wiki or
WYSIWYG mode those pages. Once you add an object with a sheet to a
page you basically make that page a structured page and thus the user
needs to edit the structured data when he clicks Edit. It's not a
plain wiki page any more.

Now, you may want to still use the page content and title to store
some data besides the structured data from the attached object, which
is possible and easy to do. You just need to add the content and title
fields to your sheet, at least in edit mode. You can start with:

{{velocity}}
; Title
: {{html}}{{/html}}
; Content
: {{html}}$xwiki.getTextArea($tdoc.content){{/html}}
{{/velocity}}

For a more advanced display see the AppWithinMinutes.Title and
AppWithinMinutes.Content pages from XE 4.3 (or on
https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-ui/src/main/resources/AppWithinMinutes)

Hope helps,
Marius

>
> TIA
>
> R.
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users