[TYPO3-project-formidable] Enablefields in FORMidable?
Luc Muller
l.mul-nospam-ler at ameos.com
Thu Aug 2 14:46:57 CEST 2007
You're right Manuel.
I think that this can be a good idea...
On my own I think that there is to have an <enable_field> tag. beacause we
can't adapt the query in the formidable core.
right yesterday I had to use hidden fields on a lister, so it can be a
params set by default.
I think that a <enable_field>false</enable_fields> by default can be good,
because you get more information with false than with true.
if you put it to true by default you get a lack of some information by
default.
In another way, did you tried the brand new concept of listers, with
datasources and renderlet Lister ?
where you can put you SQL query on a <![CDATA[ ]]>
that make it easier to write the sql statement.
You can use a datasource like this :
<datasources>
<datasource:DB name="pages">
<sql>
<userobj>
<php><![CDATA[
$sSql = '
SELECT
*
FROM
pages
WHERE
deleted = 0 AND hidden = 0
';
return $sSql;
]]></php>
</userobj>
</sql>
</datasource:DB>
</datasources>
Hope this helps
Luc :)
"Manuel Rego Casasnovas" <mrego at igalia.com> a écrit dans le message de news:
mailman.97.1186057914.14781.typo3-project-formidable at lists.netfielders.de...
>
> Hello everyone,
>
> I have to add in all my xml config files lines like this:
> <where>
> <term>hidden</term>
> <comparison>=</comparison>
> <value>0</value>
> </where>
> <logic>and</logic>
> <where>
> <term>deleted</term>
> <comparison>=</comparison>
> <value>0</value>
> </where>
>
> I think that would be interesting that FORMidable add the enable fields
> to all the queries.
>
> I think that this is only one change in the class dh_lister [1], and add
> something like:
> if(TYPO3_MODE == 'BE') {
> $aQuery['WHERE'] .= t3lib_BEfunc::BEenableFields($sTableName);
> } else {
> $aQuery['WHERE'] .=
> $GLOBALS['TSFE']->sys_page->enableFields($sTableName);
> }
>
> I think that this will be a good idea. Maybe can be exits a property
> <enablefields> true by default.
>
> What is your opinion about that?
>
> Best regards,
> Rego
>
> [1]
> http://test.kunstvaerker.dk/html/class_8tx__dhlister_8php-source.html#l00699
>
> --
> Manuel Rego Casasnovas
> Computer Science Engineer
> mailto:mrego at igalia.com
> Tel: +34 986 10 76 10
> Fax: +34 981 91 39 49
> Igalia - http://www.igalia.com
More information about the TYPO3-project-formidable
mailing list