duan2428 2018-04-09 17:02
浏览 36
已采纳

Typo3 8.7.x / Extbase / Typoscript:如何在使用RECORDS时删除锚点包裹

I'm using an extension template for json output. I want to get the record by id.

ajax = PAGE
ajax {
  typeNum = 99
  config {
    disableAllHeaderCode = 1
    additionalHeaders = Content-type:application/json
    admPanel = 0
    debug = 0
  }
  10 = RECORDS
  10 {
    tables = tt_content
    source = 77
  }
}

But my output has an anchor link before the data I want:

<a id="c2"></a>{"errors":[],"messages":["some message"]}

How to remove the

<a id="c2"></a>
  • 写回答

2条回答 默认 最新

  • doujie3888 2018-04-10 08:35
    关注

    Thanks @Bernd Wilke, now it's working with the following code

    ajax = PAGE
    ajax {
      typeNum = 99
      config {
        disableAllHeaderCode = 1
        additionalHeaders = Content-type:application/json
        admPanel = 0
        debug = 0
      }
      //not working, because it's not respect the storage
      #10 < tt_content.list.20.myext_p1
      10 = CONTENT
      10 {
        table = tt_content   
        renderObj = COA
        renderObj {
          10 < tt_content.list.20.myext_p1
        }
      }
    }
    

    When I'm right, with this code, it takes the content from the page from the page where the ext Template is defined and copies the rendering from the plugin. The uncommented code is not working because it's not using the content from the page where I inserted my plugin with the defined storage.

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

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)