[TYPO3-project-formidable] How to hide a searchform?
Izzie Greys
izzie.greys at gmail.com
Tue Sep 22 11:54:42 CEST 2009
Thank you very much for your help Pawel! That's exactly what I needed :-)
If someone is having the same problem here is my code :
In the renderlet:SEARCHFORM:
<process>
<userobj>
<php><![CDATA[/*<?*/
return $this->oSandBox->shouldDisplaySearch();
/*?>*/]]></php>
</userobj>
</process>
And the function in the sandbox:
function shouldDisplaySearch() {
return !$this->shouldDisplayForm();
}
(where shouldDisplayForm = function shouldDisplayForm() {
return (
$this->oForm->aORenderlets["btn-new"]->_hasThrown("click") ||
$this->oForm->aORenderlets["btn-save"]->_hasThrown("click") ||
$this->oForm->oDataHandler->_edition()
);
}
)
Thanks again.
Izzie
2009/9/21 Paweł Bandura <gawelx at gmail.com>
> Izzie Greys pisze:
> > <TYPO3-project-formidable at lists.netfielders.de>Hello List,
> >
> > Here is my problem, not a big problem, but visually not beautiful ^^
> >
> > On the first page I have a searchform and a lister.
> > I'm one the second page if I click on a button to make a new entry or if
> I
> > edit one entry of the lister. On this page I still have my searchform and
> a
> > editing box.
> >
> > My problem ? I don't want the searchform on this page. So I have added a
> > onload event on the editing box:
> >
> > return $this->aORenderlets["search-box"]->majixDisplayNone()
> >
> > It's working but the problem is that at the first load of the page, or
> each
> > time I edit and save my entry (so when the page is loaded again) I see
> the
> > searchform who appears during 1 seconde. This solution is not great. I'm
> > looking for a better idea please.
> >
> > Can somebody help me ? :-)
> >
> > Regards,
> >
> > Izzie
>
> Hi
>
> Maybe you should try <process> option.
> If TRUE, the rdt is processed, when FALSE - it's not.
>
> Regards
> Paweł Bandura
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
>
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>
More information about the TYPO3-project-formidable
mailing list