[TYPO3-project-formidable] How to make a singleview

Luc Muller l.mul-nospam-ler at ameos.com
Tue Jan 20 09:01:11 CET 2009


Hi sanosuke !
To instantiate formidable with in edition mode :

$this->oForm->init(
            $this,
            t3lib_extmgm::extPath($this->extKey) . "pi2/xml/detail.xml",
            "Here Goes the Id of your record"
);

this used with a datahandler DB.

then in your form you can place as rego said :

<renderlet:TEXT name="my_text" label="Text">
   <readonly>true</readonly>
</renderlet:TEXT>

usuaally I also set a

<renderlet:TEXT name="my_text" label="Text">
   <readonly>true</readonly>
  <renderlonly>true</renderonly>
</renderlet:TEXT>

furthermore, in your template you can use those can of stuff :

{my_text.value} to display only the value. this is I think the most 
flexible way to display data.

remember at any time in the template you can ask for :
{my_rdt.help}
 to see everything you're able to display.

As there's no "official" way to develop with formidable UWE is right too 
with his :

<pager>
    <rows>
        <perpage>1</perpage>
    </rows>
</pager>

this can be a little more time consuming. but it has been of good helps 
when you want to have prev / next links in your detail view.

Thanks everyone for your helps.

Luc

Uwe Schmelzer a écrit :
> Sanosuke303 schrieb:
>> I want to make a form but only to view data of a record whithout 
>> modification, like this image from the formidable wiki :
>> http://wiki.typo3.org/Image:Formidable-Documentation-Shot-5.png
>>
>> So how to make text field without box, only the text?
>
> My way for singleview is to use a renderlet:LISTER
> and reduce the output to only one row.
> <pager>
>     <rows>
>         <perpage>1</perpage>
>     </rows>
> </pager>
>
> Full Sourcecode see:
> http://formidable.typo3.ug/pastebin/snippet/65.html
>
>
>
> Then use a html-template to display the values.
>
> Full Sourcecode see:
> http://formidable.typo3.ug/pastebin/snippet/66.html
>
>
> I don't think it's the official way, but it works for me.
>
> greets
> uwe
>
>
>
>
>
>
>
>
>>
>> In addition, is theire a simple way like instanciation of formidable 
>> in edition mode? A singleview mode?
>>
>> Thank's for your help.
>>
>> Regards
>>
>>
>>       


-- 

*Luc Muller*
/Web Developper/
/Formidable - Rapid Application Developpement Framework for Typo3 
<http://formidable.typo3.ug>/
/Typo3 Ameos <http://www.ameos.com>/


More information about the TYPO3-project-formidable mailing list