Plone 在另一个tal:repeat函数中获取tal:repeat的索引

Plone 在另一个tal:repeat函数中获取tal:repeat的索引,plone,zope,chameleon,template-tal,Plone,Zope,Chameleon,Template Tal,如您所见,我有3个列表:Procedur\u Headers,诊断和列表程序。 Procedur\u headers给出我的选项卡的标题, diagnostics提供程序的特定id和 List\u Procedur是一个列表(查询),其中包含我需要的所有数据。 现在我想做的是在 tal:repeat="list_procedur List_Procedur[index]" 我可以在我的表中获取数据。 我已经可以得到索引了: tal:content="python:repeat['diagnos

如您所见,我有3个列表:
Procedur\u Headers
诊断
列表程序
Procedur\u headers
给出我的选项卡的标题,
diagnostics
提供程序的特定id和
List\u Procedur
是一个列表(查询),其中包含我需要的所有数据。 现在我想做的是在

tal:repeat="list_procedur List_Procedur[index]"
我可以在我的表中获取数据。 我已经可以得到索引了:

tal:content="python:repeat['diagnoses'].index"
但我不能在索引处这样做。 有人能解决这样的问题吗

<table id="tableIngrepen" class="table">
    <thead class="header">
    <tr>
        <th>Code Diagnose vast</th>
        <th tal:repeat="procedur_headers Procedur_Headers" tal:content="procedur_headers" > </th>
    </tr>
    </thead>
    <tr tal:repeat="diagnoses Diagnoses"> 
        <td tal:content="python:repeat['diagnoses'].index"></td>
        <td ><input type='text' id="dz_code" class="input-mini" value="${diagnoses.code_diagnose}" onchange="voegrijtoe_Ingrepen(this.value,this);logging(this,'Code','2')" placeholder="Code"></input></td> <!-- onfocus="rijencolom($(this).parent().children().index($(this)),$(this).parent().parent().children().index($(this).parent()))" -->
        <td colspan="6">
            <table  id="tableIngrepen" class="table table-hover" style="border-style:none">
                <thead class="header">
                    <tr>
                        <th tal:repeat="procedur_headers Procedur_Headers" tal:content="procedur_headers" > </th> <!-- style="display:none"-->
                    </tr>
                </thead>
                <tr tal:repeat="list_procedur List_Procedur[index]">
                    <td style="max-width: 60px; word-wrap: break-word" >Uitleg over de Code van deze diagnose in maximaal 200 karakters</td>
                    <td ><input type='text' id="dz_Datum" class="input-small2" value="${list_procedur.code_diagnose}"  onchange="logging(this,'Datum','2');datumvalidate(this)" placeholder="yyyy-mm-dd"></input></td>
                    <td><input type='text' id="dz_dir" class="input-mini1"  onchange="logging(this,'Dir','2')" ></input></td>
                    <td><input type='text' id="dz_aan" class="input-mini1"  onchange="logging(this,'Aan','2')" ></input></td>
                    <td><input type='text' id="dz_uit" class="input-mini1"  onchange="logging(this,'Dz','2')" ></input></td>
                </tr>
                <tr>
                    <td style="max-width: 60px; word-wrap: break-word" >Uitleg over de Code van deze diagnose in maximaal 200 karakters</td>
                    <td ><input type='text' id="dz_Datum" class="input-small2"  onchange="logging(this,'Datum','2');datumvalidate(this)" placeholder="yyyy-mm-dd"></input></td>
                    <td><input type='text' id="dz_dir" class="input-mini1"  onchange="logging(this,'Dir','2')" ></input></td>
                    <td><input type='text' id="dz_aan" class="input-mini1"  onchange="logging(this,'Aan','2')" ></input></td>
                    <td><input type='text' id="dz_uit" class="input-mini1"  onchange="logging(this,'Dz','2')" ></input></td>
                </tr>
            </table>
        </td>
    </tr>
</table>

代码诊断
Utileg超过de代码van deze诊断最大200克拉
Utileg超过de代码van deze诊断最大200克拉
解决方案是:

<tr tal:repeat="diagnoses Diagnoses"> <div tal:omit-tag="" tal:define="myindex python:repeat['diagnoses'].index"> ..use the myindex.. </div> </tr> 
。使用myindex。。

你就不能这样做:…使用myindex?谢谢!!!!!工作起来像个符咒:)唯一不起作用的是tal:omit=“True”我忽略了这一点,一切都正常。ops,它是tal:omit tag=“”,True被解释为tal的值。。。