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 オブジェクトをテキストまたは別の IMAGE に置き換えたいと思います。

問題は、「顧客」の条件を記述する方法がわからないことです。

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 に答える