douxu4610 2016-09-08 00:19
浏览 30
已采纳

Silverstripe:Top.PageControllerFunction不显示

I am using the Silverstripe Twitter module. It has a page controller function called LatestTweets($value) Which obviously displays the latest tweets.

When I add the Latest Tweets function to the Page.ss template. The tweets display. Everything works fine.

I am also using shaedawson's blocks module. I have a 'grid' block. The Grid Block has a template (Grid.ss) In the Templates Folder (templates/). When I add $Top.LatestTweets(3) to the Grid Template, the tweets do not appear.

Can anyone explain why this is happening?

  • 写回答

2条回答 默认 最新

  • dongqun1656 2016-09-13 00:44
    关注

    I figured this out. The reason why the "Latest Tweets" function was not appearing on my template, was because I had to extend Block_Controller

    I added the following to my 'extension.yml' file:

    Block_Controller:
      extensions:
        - TwitterExtension
    

    I would like to be able to 'include' the "Twitter Feed" template in my Grid Template. However this works and will do for now.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
  • ¥15 CreateBitmapFromWicBitmap内存释放问题。
  • ¥30 win c++ socket
  • ¥15 CanMv K210开发板实现功能
  • ¥15 C# datagridview 栏位进度
  • ¥15 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web
  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题