0

我有这个代码:

customers = CONTENT
                customers {
                    table = tx_nmshowroom_customers
                    select {
                        pidInList = {$plugin.tx_nmshowroom_pi1.pid.showroomData}
                        recursive = 10
                        where = FIND_IN_SET(uid, ###CUSTOMERSLIST###)
                        markers {
                            CUSTOMERSLIST.field = tx_nmshowroom_customers
                        }
                    }


                    customersList = COA
                    customersList {

                        10 = HTML
                        10.value.field = name
                        10.value.typolink{
                                    parameter = {$plugin.tx_nmshowroom_pi1.pid.customersDetailView}
                                    additionalParams = &tx_nmshowroom_pi1[customeruid]={field:uid}
                                    additionalParams.insertData = 1
                        }

                        10.stdWrap {
                            wrap = <p class='list'>|</p>
                            required = 1
                        }

                    }

                    renderObj < .customersList
                    renderObj.stdWrap {
                            wrap = <div class='label'><p>Auftrag:</p></div><div>|</div>
                            required = 1
                    }       

                }

select 也可以不返回值,这意味着没有找到记录。

在这种情况下,我想用文本或另一个图像替换客户对象。

问题是,我不知道如何在“客户”上写条件:

customers.override.if.....完全不知道。

有谁能够帮我?

非常感谢您提前。戴维德

4

2 回答 2

2

我会建议这个解决方案:

customers.stdWrap.ifEmpty = Sorry, there is no content here

如果你需要一个内容对象:

customers.stdWrap.ifEmpty.cObject = TEXT
customers.stdWrap.ifEmpty.cObject.value = Sorry, there is no content here
于 2012-10-18T13:00:30.070 回答
0
customers = COA
customers {
  10 = CONTENT
  10 {
    table = tx_nmshowroom_customers
    select {
      pidInList = {$plugin.tx_nmshowroom_pi1.pid.showroomData}
      recursive = 10
      where = FIND_IN_SET(uid, ###CUSTOMERSLIST###)
      markers {
        CUSTOMERSLIST.field = tx_nmshowroom_customers
      }
    }

    renderObj = COA
    renderObj {
      10 = HTML
      10 {
        value.field = name
        value.typolink{
          parameter = {$plugin.tx_nmshowroom_pi1.pid.customersDetailView}
          additionalParams = &tx_nmshowroom_pi1[customeruid]={field:uid}
          additionalParams.insertData = 1
        }

        stdWrap {
          wrap = <p class='list'>|</p>
          required = 1
        }
      }

      wrap = <div class='label'><p>Auftrag:</p></div><div>|</div>
      required = 1
    }
  }

  20 = TEXT
  20 {
    if.isFalse.numRows < customers.10
    value = [substitute content]
  }
}
于 2012-10-17T14:29:14.363 回答