RE: Ajouter plus de pages dans une section CPS
"Winterflood, Jonathan" <[email protected]> Tue, 15 Jan 2008 16:35:06 +0100
| Newsgroups | gmane.comp.web.zope.cps.general.french |
|---|---|
| Message-ID | <9FD178D09DF6AC43B2FF313CFB0D11EDA5AEBE@CORPMAIL33.corp.capgemini.com> |
Bonjour,
J'ai été confronté à ce 'problème' lors du développement d'un site à base de CPSDefault sur CPS 3.4.2
Ma solution a été la suivante :
CPSDefault utilise folder_contents.pt pour afficher le contenu d'un dossier, lequel utilise content_libdisplay_content.pt, lequel utilise à son tour getBatchList.py
Ce dernier prend un paramètre max_items, par défaut 100, pour limiter les résultats. Les .pt ne permettent pas de fournir cette valeur à la méthode python.
J'ai dont ajouté cette possibilité en surchargeant ces deux fichiers dans mon dossier skins.
Ci-dessous et en PJ.les diffs correspondants :
*** cpsdef~content_lib_display_contents.pt 2007-12-06 10:29:10.364424400 +0100
--- dbr~content_lib_display_contents.pt 2008-01-15 15:26:54.990403800 +0100
***************
*** 34,41 ****
mq nocall:modules/ZTUtils/make_query;
form request/form;
zoom zoom|python:0;
batches_all python:here.getBatchList(items, columns, items_per_page,
! zoom);
batches python:batches_all[0];
batch_info python:batches_all[1];
zoomed python:batches_all[2];
--- 34,42 ----
mq nocall:modules/ZTUtils/make_query;
form request/form;
zoom zoom|python:0;
+ max_items max_items|python:100;
batches_all python:here.getBatchList(items, columns, items_per_page,
! zoom, max_items);
batches python:batches_all[0];
batch_info python:batches_all[1];
zoomed python:batches_all[2];
*** cpsdef~folder_contents.pt 2007-12-06 10:29:12.098721700 +0100
--- dbr~folder_contents.pt 2008-01-15 15:48:01.661611000 +0100
***************
*** 70,76 ****
tal:define="no_form python:not checkPerm('Modify portal content', here);
nav_action string:folder_contents;
! items python:here.getFolderContents(displayed=displayed);">
<metal:block use-macro="here/content_lib_display_contents/macros/display_contents" />
--- 70,77 ----
tal:define="no_form python:not checkPerm('Modify portal content', here);
nav_action string:folder_contents;
! items python:here.getFolderContents(displayed=displayed);
! max_items nothing">
<metal:block use-macro="here/content_lib_display_contents/macros/display_contents" />
En espérant que vous aide,
Cordialement,
Jonathan Winterflood (3237)
Capgemini Ouest - Agence de Brest
P Please consider the environment and do not print this email unless absolutely necessary. Capgemini encourages environmental awareness
________________________________
De : [email protected] [mailto:[email protected]] De la part de Mohamed Amine SALIL
Envoyé : mardi 15 janvier 2008 15:12
À : [email protected]
Objet : [CPS-users-fr] Ajouter plus de pages dans une section CPS
Bonjour à toutes et à tous,
Je viens de mettre en place un portail intranet à l'aide de CPS il y a peu de temps. J'utilise une section de mon portail comme un trombinoscope où j'ai ajouté des documents flexibles pour chaque collaborateur de notre société.
Mon problème, c'est que dans cette section, je ne peux afficher que les 100 premiers documents flexibles. Comment faire en sorte d'afficher tous les objets qui se trouve dans cette section ?
Merci à toutes et à tous pour votre aide.
Regards / Salutations.
Mohamed Amine SALIL
Apprenti Ingénieur Réseaux et Systèmes
9, allée des Barbanniers - 92220 Gennevilliers
Tel :+ 33 (0) 1.41.85.03.66 /+ 33 (0) 6.18.32.59.83
www.coyne-et-bellier.fr <http://www.coyne-et-bellier.fr/>
Pensez à l'environnement avant d'imprimer ce message
Think Environment before printing this mail
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
_______________________________________________
cps-users-fr
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>
image001.gif
(image/gif, 1.8 KB) - not displayed
content_lib_display_content.pt.diff
(application/octet-stream, 1 KB)
*** cpsdef~content_lib_display_contents.pt 2007-12-06 10:29:10.364424400 +0100
--- dbr~content_lib_display_contents.pt 2008-01-15 15:26:54.990403800 +0100
***************
*** 34,41 ****
mq nocall:modules/ZTUtils/make_query;
form request/form;
zoom zoom|python:0;
batches_all python:here.getBatchList(items, columns, items_per_page,
! zoom);
batches python:batches_all[0];
batch_info python:batches_all[1];
zoomed python:batches_all[2];
--- 34,42 ----
mq nocall:modules/ZTUtils/make_query;
form request/form;
zoom zoom|python:0;
+ max_items max_items|python:100;
batches_all python:here.getBatchList(items, columns, items_per_page,
! zoom, max_items);
batches python:batches_all[0];
batch_info python:batches_all[1];
zoomed python:batches_all[2];
folder_contents.pt.diff
(application/octet-stream, 881 B)
*** cpsdef~folder_contents.pt 2007-12-06 10:29:12.098721700 +0100
--- dbr~folder_contents.pt 2008-01-15 15:48:01.661611000 +0100
***************
*** 70,76 ****
tal:define="no_form python:not checkPerm('Modify portal content', here);
nav_action string:folder_contents;
! items python:here.getFolderContents(displayed=displayed);">
<metal:block use-macro="here/content_lib_display_contents/macros/display_contents" />
--- 70,77 ----
tal:define="no_form python:not checkPerm('Modify portal content', here);
nav_action string:folder_contents;
! items python:here.getFolderContents(displayed=displayed);
! max_items nothing">
<metal:block use-macro="here/content_lib_display_contents/macros/display_contents" />