[TYPO3-mvc] fluid problem with assigned variable
Johannes C. Schulz - EnzephaloN IT-Solutions
info at enzephalon.de
Wed Nov 16 13:19:00 CET 2011
Hello Henjo
No, ist an other problem:
Controller:
[...]
$this->view->assign('formtype',$this->settings['formtype']);
$this->view->assign('today',date("d.m.Y"));
$this->view->assign('tomorrow',date("d.m.Y",time()+84600));
[...]
FluidTemplate:
<f:if condition="{0:formtype} == {0:'small'}">
<!--showing a small form-->
<f:then>
...some stuff...
<input type="text" name="date_from" size="10" class="datepicker"
value="{today}" />
...stuff...
<select name="number_adult[]" class="" id="ADULTS" style="max-width:100px;">
<f:for each="{adults}" as="adult">
<option value="{adult}">{adult}</option>
</f:for>
</select>
...some stuff...
</f:then>
<f:else>
<!--showing a large form-->
...some more stuff...
<input type="text" name="date_from" size="10" class="datepicker"
value="{today}" />
...stuff...
<select name="number_adult[]" class="" id="ADULTS" style="max-width:100px;">
<f:for each="{adults}" as="adult">
<option value="{adult}">{adult}</option>
</f:for>
</select>
...some other stuff...
</f:else>
</f:if>
The switch between "small" and "other" works fine, but the {today} only
works in else-part, not in then-part! All other assigned values are working
(such as I called {childage} or {adults} ). This is my problem.
Best regards
Johannes
-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Henjo Hoeksma
Gesendet: Mittwoch, 16. November 2011 11:35
An: TYPO3 v4 MVC project
Betreff: Re: [TYPO3-mvc] fluid problem with assigned variable
Hi Johannes,
if the variable is set in your condition for when it's false and not showing
up for when your condition is true I would start to think you did some logic
in your controller as well.
I.e.: does the variable get's properly assigned when the condition is true
in your controller?
Kind regards,
Henjo
Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.
On Wed, Nov 16, 2011 at 11:32, Johannes C. Schulz - EnzephaloN IT-Solutions
<info at enzephalon.de> wrote:
> Again, my question
>
> Has anyone an idea, why an "marker" {today} or {tomorrow} in the same
> fluid-template one time is replaced by its assigned value and
> sometimes not?
>
> Best regards
> Johannes
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag
> von Peter Niederlag
> Gesendet: Dienstag, 15. November 2011 16:45
> An: typo3-project-typo3v4mvc at lists.typo3.org
> Betreff: Re: [TYPO3-mvc] fluid problem with assigned variable
>
> Hello,
>
> Am 15.11.2011 13:34, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
> > Hello typo3-comunity
> >
> >
> >
> > Today I have an curious problem. I have a fluid-template switching
> > between "large" and "small" by <f:if condition="{0:formtype} ==
> {0:'small'}">.
> > The then-part has one error:
>
> fluid version? conditions used to be only capable of "int"/"boolean"
> but
> *not*(!) string comparisons. Not sure wether this has changed already
> in a recent version.
>
> [...]
>
> Greets,
> Peter
> --
> Peter Niederlag
> http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc
>
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list