script

Wednesday, June 20, 2012

Use array of objects in fluid + extbase

Assign object that can be used in fluid template

Controller
$uploads is object of controller
By $uploads->div[] asigining each value to object upload


        $divs = array(1,2,3,4,5);
        foreach($divs as $d)
        {
            $uploads->div[] = $d;
           
        }


Now use in fluid template

<f:for each="{uploads}" as="upload">
        <f:cycle values="{uploads.div}" as="cycle">
       {cycle}
       </f:cycle>
</f:for>


Output:
It will print 12345

Tuesday, June 19, 2012

Redirect to custom action in extbase

protected function redirect($actionName, 
$controllerName = NULL, 
$extensionName = NULL, 
array $arguments = NULL, 
$pageUid = NULL, 
$pageType = NULL, 
$delay = 0, 
$statusCode = 303)
 

Example...
If suppose i have payment controller then

1)Redirect to new action
$this->redirect('new');    

2)Redirect to edit action
$this->redirect('edit','Payment',NULL,array('payment'=>UID_OF_RECORD));   

Monday, June 18, 2012

Backend not working in TYPO3 4.7

1) Go to --> PROJECT_URL/typo3/install/
2) Click on link Upgrade Wizard
3) Run all the wizards by clicking each and every next buttons.

It will work now. :)

Wednesday, June 13, 2012