[TYPO3-project-formidable] Newby question
Albert van der Veen
albert.van.der.veen at xs4all.nl
Wed Mar 19 10:55:33 CET 2008
Hi Jerome,
You're welcome, thanks for clarifying things :)
Disadvantage of the method you're proposing below (as far as I can see),
is that you won't be able to use all the powerful features in the xml
config. For instance I'm using the code below to show a box on button
click.
So, for the time being it's probably best to stick to using the edition
mode and configuring the renderlets as readonly.
I hope to be able to dive into the Formidable code a little deeper in
the near future, to see if I can contribute in any way. But am on a very
tight schedule at the moment...
Thanks for your help!
grtz,
Albert
<!-- Abstract button + box begin-->
<renderlet:BUTTON name="btn_abstract" label="View Abstract">
<onclick runat="client">
<userobj>
<php><![CDATA[
return array(
$this->aORenderlets["box_abstract"]->majixFx("toggleBlind"),
$this->aORenderlets["box_abstract"]->majixFx("scrollTo"),
);
]]></php>
</userobj>
</onclick>
</renderlet:BUTTON>
<renderlet:BOX mode="div" name="box_abstract" style="display: none;">
<childs>
<renderlet:TEXTAREA name="abstract" label="Abstract" readonly="true" />
</childs>
</renderlet:BOX>
<!-- Abstract button + box end-->
Jerome Schneider wrote:
> Hi Albert,
> Thanks for the feedback :)
>
> You're right when saying that it's not optimal to use datahandler:DB
> with all rdt's readonly to display a record.
>
> I also agree that the best way would be to improve the data layer,
> adding the ability to bind a box to a datasource, to create a local
> "data-context" if you see what I mean.
>
> We thought about this already, but nothing came out for the moment.
>
> something like:
>
> <renderlet:BOX name="my-page-box">
> <datasource use="page" />
> <childs>
> <renderlet:TEXT name="title" />
> <renderlet:DATE name="crdate/>
> <!-- ... -->
> </childs>
> </renderlet:BOX>
>
>
>
> For the moment, there's another way to achieve this, if you're using a
> renderer:TEMPLATE; 2 steps:
>
> 1 - manually fetch the row from the DB and pass it to the renderer:TEMPLATE
> 2 - Use the template syntax to access data and display it in the html
>
> I put an example here:
>
> http://formidable.typo3.ug/features/template-engine/inject-data-in-the-template.html
>
>
> Best regards,
> Jerome Schneider
>
>
>
>
>
>
>
> Albert van der Veen a écrit :
>> Thanks Jerome,
>>
>> That's how I had set it up, based on posts on this list, and works
>> fine. It feels like 'misusing' the 'edition' method though. Now you
>> have to have a datahandler:DB, although nothing is done with the data
>> except displaying it.
>> It would make more sense to have something like the renderlet:LISTER,
>> that doesn't need a datahandler, only a datasource. The readonly also
>> wouldn't be necessary on each renderlet, as it would be assumed.
>>
>> As I said, I have just started using Formidable (and loving it
>> already), so don't take this as a negative feedback, only wondering
>> why it works like this...
>>
>> grtz,
>> Albert
>>
>> Jerome Schneider wrote:
>>> Hi Albert,
>>>
>>> You may use a datahandler:DB with tablename and keyname properly set.
>>>
>>> To edit a particular uid with this, you'll have to pass it as the
>>> third argument of init() in your plugin code
>>>
>>> And renderlets should be set as readonly=true
>>>
>>> Best regards,
>>> Jerome
>>>
>>>
>>>
More information about the TYPO3-project-formidable
mailing list