1

I have TYPO3 4.6, in tempvoila template i have typoscript object path lib.header and I want to redirect output of plugin to lib.header I have extension Gallery and plugin written and configured in ext_localconf.php like this:

Tx_Extbase_Utility_Extension::configurePlugin(
   $_EXTKEY,
   'RandomPhotoSlideShow',
   array(
       'Photo' => 'randomPhotoSlideShow',
   ),
   // non-cacheable actions
    array(

        'Photo' => ''

    )
);

in ext_tables.php like this:

Tx_Extbase_Utility_Extension::registerPlugin(
    $_EXTKEY,
    'RandomPhotoSlideShow',
    'Gets random photos for slide show'
);

and in typoscript template I have this:

plugin.tx_gallery.widgets {
    papaWidget = USER
    papaWidget {
        userFunc = tx_extbase_core_bootstrap->run
       pluginName = RandomPhotoSlideShow
        extensionName = Gallery
        controller = Photo
        action = randomPhotoSlideShow
        switchableControllerActions {
                Photo {
                        1 = randomPhotoSlideShow
                }
        }

        settings =< plugin.tx_gallery.settings
        persistence =< plugin.tx_gallery.persistence
        view =< plugin.tx_gallery.view
        }
}

lib.header < plugin.tx_gallery.widgets.papaWidget

But nothing is displayed, could someone please advice where I have mistake or if something changed in extbase 1.4 included in TYPO3 4.6?

Daniel
  • 6,916
  • 2
  • 36
  • 47
anjalis
  • 397
  • 2
  • 19

2 Answers2

1

I think the problem is your action. Do you really have a randomPhotoSlideShowAction in your Controller? Also check if the specified pluginName is correct.

Please try to specify your index or list Action and see what happens.

action = index
switchableControllerActions {
    Photo {
        1 = index
    }
}

If your action is correct, make sure you are actually returning something from your action!

public function randomPhotoSlideShowAction(...) { 

    // [...]

    $this->view->assign('foo', 'bar');

    return $this->view->render();
}
Alex
  • 12,205
  • 7
  • 42
  • 52
  • Thanks a lot :), i have randomPhotoSlideShowAction there but i don't give there return value :), now it's all ok, i didn't realize that rendered view must be returned – anjalis Jan 09 '12 at 19:54
0

Your code looks good, the only thing missing is the Controller part (as per naming convention) in

controller = PhotoController
konsolenfreddy
  • 9,551
  • 1
  • 25
  • 36
  • Thanks, but as i found here http://www.adick.at/2011-07-01,extbase-plugins-mit-typoscript-einbinden/ and here http://www.adick.at/2011-07-01,extbase-plugins-mit-typoscript-einbinden/ there shouldn't be Controller part also i tried it but without success – anjalis Jan 06 '12 at 23:50