[TYPO3-mvc] fluid problem with assigned variable

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Mon Nov 21 12:19:26 CET 2011


Hello together
Okay, I splitted the template/controllerAction in two parts:
tportalformAction with Tportalform.html template and tportalformsmallAction
with Tportalformsmall.html template.
But: same problem...
I will add the code (mainly the same used in "big"-version):
Hotellistcontroller.php
[...]
/**
 * Display the TPORTAL Searchform and redirects to TPORTAL SMALL VARIANT!!!
 */
public function tportalformsmallAction(){
  $adults = array();$childage = array();
    for($a=1;$a<8;$a++){
	$adults[$a] = $a;
   }
   for ($c=1;$c<18;$c++){
      $childage[$c] = $c;
		}
$this->view->assign('childage',$childage);
$this->view->assign('adults',$adults);
$this->view->assign('today',date("d.m.Y"));
$this->view->assign('tomorrow',date("d.m.Y",time()+84600));
}
[...]
Tportalformsmall.html
[...]
<div class="tx_enzhotellist_label" style="margin-left:55px;"><f:translate
key="tx_enzhotellist_domain_model_hotellist_fe.exitdate" />: </div>
        <script>
          jQuery(function() {
            jQuery( ".datepicker" ).datepicker({dateFormat: 'dd.mm.yy'});
          });
        </script>
        <div class="clear"></div>
        <input type="text" name="date_from" size="10" class="datepicker"
value="{today}" />
  		  <input type="text" name="date_to" size="10"
class="datepicker" value="{tomorrow}" />
  		  <div class="clear"></div>
[...]

Do you see the failure?
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: Montag, 21. November 2011 11:27
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] fluid problem with assigned variable

Hello,

Do you use any custom viewhelpers?
Do you use any non standard validators, controllers, views, ...?

Try to reduce complexity into a simple action/template and then readd
code/functionality to see where the failure triggers.

Greets and hth,
Peter

Am 21.11.2011 11:11, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
> Hello Franz
> Thanks for your answer.
> I tested your way: swapped the content oft he if-parts and changed the 
> condition to != But the behavior keeps the same: the "small"-part (now 
> inside the else-part) does not replace the markers. The then-part 
> does.
> I need the condition to switch between two layouts (small and big), if 
> I delete the condition I have to write another controller and that I 
> wanna avoid.
> Kind 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 Franz Koch
> Gesendet: Montag, 21. November 2011 09:38
> An: typo3-project-typo3v4mvc at lists.typo3.org
> Betreff: Re: [TYPO3-mvc] fluid problem with assigned variable
> 
> Hi Johannes,
> 
>> 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.
> 
> have you tried to switch the two template snippets inside the 
> conditions and see how they behave then or if they render fine if you 
> remove the if condition entirely?
> 
> --
> kind regards,
> Franz Koch
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc
> 
> 


--
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-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list