<?php $c = Page::getCurrentPage(); $currentcID=$c->getCollectionID();if($currentcID==1){ ?>
<script type="text/javascript">
$(function(){
$('#test').css({opacity:0,left:200});
});
</script>
<?php } ?> Page::getCurrentPage()でページオブジェクトを取得し、->getCollectionID()でページのcIDを取得。
そして、上記の例ではcID==1すなわち、homeのページに対してjQueryコードを適用する、ということをしています。
備忘録とご参考まで。
0 件のコメント:
コメントを投稿