Create new display views

10 Messages Forum Options Options
Embed this topic
Permalink
steven shade
Create new display views
Reply Threaded MoreMore options
Print post
Permalink
Hi

I want to create 2 additional versions of the folder_listing view; one that shows the files in 'alphabetical title' order and another that shows them in reverse 'date last modified' order. Can someone outline the process involved?
Thanks
Steven

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
steven shade
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
I have found some guidance on the overall process via the following link:
https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates

>From this I have been able to customise the original standard view to show the contents in reverse modified date:

        <tal:foldercontents define="contentFilter contentFilter|request/contentFilter|python:{'sort_on' : 'modified', 'sort_order' : 'reverse'};

However, I cant seem to sort on title, is the title attribute not indexed?
What do I have to do to be able to achieve this?

Also, once I add these templates to my theme product and have amended the types.xml (in profiles/default), do I need to add an entry in configure.zcml?
Thanks
Steven

On Mon, Aug 11, 2008 at 9:45 AM, steven shade <steven.shade1@...> wrote:
Hi

I want to create 2 additional versions of the folder_listing view; one that shows the files in 'alphabetical title' order and another that shows them in reverse 'date last modified' order. Can someone outline the process involved?
Thanks
Steven


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
steven shade
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
Still wondering how to sort on title, if anyone can help?
Thanks
Steven

On Wed, Aug 13, 2008 at 11:51 AM, steven shade <steven.shade1@...> wrote:
I have found some guidance on the overall process via the following link:
https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates

>From this I have been able to customise the original standard view to show the contents in reverse modified date:

        <tal:foldercontents define="contentFilter contentFilter|request/contentFilter|python:{'sort_on' : 'modified', 'sort_order' : 'reverse'};

However, I cant seem to sort on title, is the title attribute not indexed?
What do I have to do to be able to achieve this?

Also, once I add these templates to my theme product and have amended the types.xml (in profiles/default), do I need to add an entry in configure.zcml?
Thanks
Steven


On Mon, Aug 11, 2008 at 9:45 AM, steven shade <steven.shade1@...> wrote:
Hi

I want to create 2 additional versions of the folder_listing view; one that shows the files in 'alphabetical title' order and another that shows them in reverse 'date last modified' order. Can someone outline the process involved?
Thanks
Steven



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Eric Steele (esteele)
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
I think 'sortable_title' is what you're looking for.

Eric

steven shade wrote:
Still wondering how to sort on title, if anyone can help?
Thanks
Steven

On Wed, Aug 13, 2008 at 11:51 AM, steven shade <steven.shade1@googlemail.com
> wrote:

> I have found some guidance on the overall process via the following link:
> https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates
>
> From this I have been able to customise the original standard view to show
> the contents in reverse modified date:
>
>         <tal:foldercontents define="contentFilter
> contentFilter|request/contentFilter|python:{'sort_on' : 'modified',
> 'sort_order' : 'reverse'};
>
> However, I cant seem to sort on title, is the title attribute not indexed?
> What do I have to do to be able to achieve this?
>
> Also, once I add these templates to my theme product and have amended the
> types.xml (in profiles/default), do I need to add an entry in
> configure.zcml?
> Thanks
> Steven
>
>
> On Mon, Aug 11, 2008 at 9:45 AM, steven shade <
> steven.shade1@googlemail.com> wrote:
>
>> Hi
>>
>> I want to create 2 additional versions of the folder_listing view; one
>> that shows the files in 'alphabetical title' order and another that shows
>> them in reverse 'date last modified' order. Can someone outline the process
>> involved?
>> Thanks
>> Steven
>>
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
Israel Saeta Pérez
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by steven shade
You need to register a extension profile using ZCML and Generic Setup
directives in the configure.zcml file:

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    i18n_domain="your.package">


    <five:registerPackage package="." initialize=".initialize" />

    <genericsetup:registerProfile
        name="yourpackage.profile"
        title="Your Package Profile"
        directory="profiles/default"
        description="Default Profile for you package"
        provides="Products.GenericSetup.interfaces.EXTENSION"
        />

</configure>



On Wed, Aug 13, 2008 at 12:51 PM, steven shade
<steven.shade1@...> wrote:

> I have found some guidance on the overall process via the following link:
> https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates
>
> >From this I have been able to customise the original standard view to show
> the contents in reverse modified date:
>
>         <tal:foldercontents define="contentFilter
> contentFilter|request/contentFilter|python:{'sort_on' : 'modified',
> 'sort_order' : 'reverse'};
>
> However, I cant seem to sort on title, is the title attribute not indexed?
> What do I have to do to be able to achieve this?
>
> Also, once I add these templates to my theme product and have amended the
> types.xml (in profiles/default), do I need to add an entry in
> configure.zcml?
> Thanks
> Steven
>
> On Mon, Aug 11, 2008 at 9:45 AM, steven shade <steven.shade1@...>
> wrote:
>>
>> Hi
>>
>> I want to create 2 additional versions of the folder_listing view; one
>> that shows the files in 'alphabetical title' order and another that shows
>> them in reverse 'date last modified' order. Can someone outline the process
>> involved?
>> Thanks
>> Steven
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users
>
>



--
Israel Saeta Pérez
http://dukebody.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Israel Saeta Pérez
steven shade
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
Thanks eric, 'sortable_title' did the trick.

Still having trouble with the best way to do this in my theme product though.
So as I understand it I need to do the following:
1) Add the generic setup directives to my configure.zcml file
2) Create my new template and put this in my theme package
3) Add a <browser:page ... directive to the configure.zcml file which points to my new template
4) Amend the types.xml file so that the new view template shows up in the display menu

However I dont know what information to put in either the <browser:page directive or the types.xml file.
Has anyone done this before or can anyone point me to some examples?
Thanks
Steven

On Fri, Aug 22, 2008 at 6:18 PM, Israel Saeta Pérez <dukebody@...> wrote:
You need to register a extension profile using ZCML and Generic Setup
directives in the configure.zcml file:

<configure
   xmlns="http://namespaces.zope.org/zope"
   xmlns:five="http://namespaces.zope.org/five"
   xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
   i18n_domain="your.package">


   <five:registerPackage package="." initialize=".initialize" />

   <genericsetup:registerProfile
       name="yourpackage.profile"
       title="Your Package Profile"
       directory="profiles/default"
       description="Default Profile for you package"
       provides="Products.GenericSetup.interfaces.EXTENSION"
       />

</configure>



On Wed, Aug 13, 2008 at 12:51 PM, steven shade
<steven.shade1@...> wrote:
> I have found some guidance on the overall process via the following link:
> https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates
>
> >From this I have been able to customise the original standard view to show
> the contents in reverse modified date:
>
>         <tal:foldercontents define="contentFilter
> contentFilter|request/contentFilter|python:{'sort_on' : 'modified',
> 'sort_order' : 'reverse'};
>
> However, I cant seem to sort on title, is the title attribute not indexed?
> What do I have to do to be able to achieve this?
>
> Also, once I add these templates to my theme product and have amended the
> types.xml (in profiles/default), do I need to add an entry in
> configure.zcml?
> Thanks
> Steven
>
> On Mon, Aug 11, 2008 at 9:45 AM, steven shade <steven.shade1@...>
> wrote:
>>
>> Hi
>>
>> I want to create 2 additional versions of the folder_listing view; one
>> that shows the files in 'alphabetical title' order and another that shows
>> them in reverse 'date last modified' order. Can someone outline the process
>> involved?
>> Thanks
>> Steven
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users
>
>



--
Israel Saeta Pérez
http://dukebody.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
afewtips.com
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
I am not sure this will solve your problem, but you may want to consider setting the view to a collection and sort the results in the collection.

steven shade wrote:
Thanks eric, 'sortable_title' did the trick.

Still having trouble with the best way to do this in my theme product
though.
So as I understand it I need to do the following:
1) Add the generic setup directives to my configure.zcml file
2) Create my new template and put this in my theme package
3) Add a <browser:page ... directive to the configure.zcml file which points
to my new template
4) Amend the types.xml file so that the new view template shows up in the
display menu

However I dont know what information to put in either the <browser:page
directive or the types.xml file.
Has anyone done this before or can anyone point me to some examples?
Thanks
Steven

On Fri, Aug 22, 2008 at 6:18 PM, Israel Saeta Pérez <dukebody@gmail.com>wrote:

> You need to register a extension profile using ZCML and Generic Setup
> directives in the configure.zcml file:
>
> <configure
>    xmlns="http://namespaces.zope.org/zope"
>    xmlns:five="http://namespaces.zope.org/five"
>    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
>    i18n_domain="your.package">
>
>
>    <five:registerPackage package="." initialize=".initialize" />
>
>    <genericsetup:registerProfile
>        name="yourpackage.profile"
>        title="Your Package Profile"
>        directory="profiles/default"
>        description="Default Profile for you package"
>        provides="Products.GenericSetup.interfaces.EXTENSION"
>        />
>
> </configure>
>
>
>
> On Wed, Aug 13, 2008 at 12:51 PM, steven shade
> <steven.shade1@googlemail.com> wrote:
> > I have found some guidance on the overall process via the following link:
> > https://weblion.psu.edu/trac/weblion/wiki/ViewTemplates
> >
> > >From this I have been able to customise the original standard view to
> show
> > the contents in reverse modified date:
> >
> >         <tal:foldercontents define="contentFilter
> > contentFilter|request/contentFilter|python:{'sort_on' : 'modified',
> > 'sort_order' : 'reverse'};
> >
> > However, I cant seem to sort on title, is the title attribute not
> indexed?
> > What do I have to do to be able to achieve this?
> >
> > Also, once I add these templates to my theme product and have amended the
> > types.xml (in profiles/default), do I need to add an entry in
> > configure.zcml?
> > Thanks
> > Steven
> >
> > On Mon, Aug 11, 2008 at 9:45 AM, steven shade <
> steven.shade1@googlemail.com>
> > wrote:
> >>
> >> Hi
> >>
> >> I want to create 2 additional versions of the folder_listing view; one
> >> that shows the files in 'alphabetical title' order and another that
> shows
> >> them in reverse 'date last modified' order. Can someone outline the
> process
> >> involved?
> >> Thanks
> >> Steven
> >
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Plone-Users mailing list
> > Plone-Users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/plone-users
> >
> >
>
>
>
> --
> Israel Saeta Pérez
> http://dukebody.com
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plone-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plone-Users mailing list
Plone-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
Sergey V.
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by steven shade

steven shade wrote:
However I dont know what information to put in either the <browser:page
directive or the types.xml file.
folder_listing.pt is just an old-styled skin template, not a zope3 view. Just put modified versions into your product's skins folder and they are available straight away without any zcml magic.

(registering them with Generic Setup is still necessary though if you want them to appear in Display menu, but you may test/debug them using myfolder/folder_listing_sorted_by_title etc.)

Use .pt.metadata file to give your template a nice name in the Display menu (which is impossible AFAIK with zope3 views).
Sergey V.
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by steven shade

steven shade wrote:
However I dont know what information to put in either the <browser:page
directive or the types.xml file.
Has anyone done this before or can anyone point me to some examples?
If your registering a new view template for existing types you don't need to touch types.xml. You need to add/modify yourproduct/profiles/default/types/Folder.xml (if you registering it for Folder). You may use CMFPlone/profiles/default/types/Whatever.xml as a basis - and you can safely remove everything not related to your task from that file, so you'll end up with something like this:
===========================
<?xml version="1.0"?>


 <property name="default_view">folder_listing</property>
 <property name="view_methods">
  <element value="folder_summary_view"/>
  <element value="folder_tabular_view"/>
  <element value="atct_album_view"/>
  <element value="folder_listing"/>
  <element value="folder_listing_sorted_by_title"/>
  <element value="folder_listing_sorted_by_something_else"/>
 </property>

===============================

Sergey V.
Re: Create new display views
Reply Threaded MoreMore options
Print post
Permalink
Sorry, [object] tags are not visible after posting, for a correct example see plone's Folder.xml