欲しいもの : ホームページにカスタム メニューが欲しいです。(カスタム リンク アプリケーションからの) 4 つの画像 (およびリンク) を正方形に表示したいと思います。(すべての端にあるように、いくつかの画像/リンク)単純なリストとは異なります(これを参照してください:
- MyImage1.jpg MyLink1
- MyImage2.jpg MyLink2
- MyImage3.jpg MyLink3
- MyImage4.jpg MyLink4 )
私が持っているもの:
そこで、URL、メモ、ImageUrl などのいくつかの列を含むカスタム リンク アプリケーションを作成しました。
私のホームでは、カテゴリ「Report de contenu」の WebPart を作成しました。これは、英語ではContent Reportであると思われますが、コンポーネント「ContentSearch」です。
この WebPart は、Control_List.html のコピーであるカスタム Control テンプレートと、 Item_Picture3Lines.htmlのコピーであるカスタム Item テンプレートで表示されます。
私の質問は何ですか: Control_List.html の js には、次のものがあります。
var ListRenderRenderWrapper = function(itemRenderResult, inCtx, tpl, i)
{
var iStr = [];
iStr.push('<li>');
iStr.push(itemRenderResult);
iStr.push('</li>');
return iStr.join('');
}
これはすべてのアイテムを li としてレンダリングしますが、すべての特別な表示 (Item_Picture3Lines.html で定義) を使用して、これらのアイテムを 2x2 テーブルにレンダリングしたいと考えています。お気に入り
<table>
<tr>
<td id=Myitem1>
<!-- All my content, displayed by the item display template -->
</td>
<td id=Myitem2>
<!-- All my content, displayed by the item display template -->
</td>
</tr>
<tr>
<td id=Myitem3>
<!-- All my content, displayed by the item display template -->
</td>
<td id=Myitem4>
<!-- All my content, displayed by the item display template -->
</td>
</tr>
</table>
私はテーブルが醜いなどを知っています..
私の質問は.. コントロール表示テンプレートに表示されるアイテムの数を知るにはどうすればよいですか?
どうもありがとう、私はSharepointの初心者です、親切にしてください! :)