TYPO3 4.6包含带有错字的extbase插件 [英] TYPO3 4.6 include extbase plugin with typoscript

查看:82
本文介绍了TYPO3 4.6包含带有错字的extbase插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有TYPO3 4.6,在tempvoila模板中我有错字对象路径lib.header,我想要 将插件的输出重定向到lib.header 我在ext_localconf.php中编写并配置了扩展库和插件,如下所示:

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' => ''

    )
);

像这样在ext_tables.php中

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

但是什么也没有显示,有人可以建议我哪里出错了,或者TYPO3 4.6中包含的extbase 1.4中有什么更改吗?

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?

推荐答案

我认为问题在于您的行为.您的控制器中确实有一个randomPhotoSlideShowAction吗? 还要检查指定的pluginName是否正确.

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();
}

这篇关于TYPO3 4.6包含带有错字的extbase插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆