Maurits van Rees | 1 Jul 2009 01:17
Picon
Favicon
Gravatar

Re: viewlet best practice (please clarify)

Hi Donna,

Donna Snow, on 2009-06-30:
> Hi,
>
> I'm a bit confused here and would love some confirmation on the way I'm
> doing viewlets for Plone themes.
>
> My current process:
>
> (on the filesystem)
>
> in /browser
> make a copy of viewlet.pt (call it myviewlet.pt or newbanner.pt or
> newfooter.pt - you get the picture)
> (remove the <div tal:content="view/computed_value"/> line - can someone
> explain what "computed_value" is used for?)

It is used as a placeholder for code that you will write in the
viewlets.py.  See the inline documentation in that file (if you
answered 'True' to the paster question 'Include in-line documentation
in generated code?').  We could also have called it:

view/sample_call
view/some_parameter_you_define_in_the_viewlet_class
view/something_interesting
view/whatever

> go to viewlets.py and add
>
(Continue reading)

Donna Snow | 1 Jul 2009 02:09
Picon
Gravatar

Re: viewlet best practice (please clarify)

Hi Maurits,

Thank You! I appreciate the very detailed response.



I have changed ZopeSkel to generate this in the viewlet.pt instead,
which prevents that breakage:

 <div tal:content="view/computed_value|nothing"/>

And I added this commented out documentation in the page template:

 'view' refers to the MyViewlet class in viewlets.py
 If you do not need anything fancy where python code might help,
 like just a viewlet that displays '<h1>Hello World</h1>',
 then you can remove anything else from this page template, remove
 viewlets,py and change the viewlet registration in configure.zcml:
 replace
    class=".viewlets.MyViewlet"
 with
    template="viewlet.pt"

Does that help?

+1000 maurits, this is beautiful. It will most certainly help myself and others who are not programmers but have to work with viewlets to complete a theme to understand a bit better!

(thank you so much)

See, this is why I love this community. Thanks for your time and your effort Maurits. This made working with viewlets a little bit easier!

Donna M Snow
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Thomas Massmann | 1 Jul 2009 09:11
Picon
Favicon

Re: Viewlets not uninstalling

Hi Paul,

plonetheme.labs uses an uninstall profil to "reset" several things  
like viewlets, skin layers and css registry. If you create your themes  
with paster, this step is not included.

There's a detailed how-to from Weblion
(http://weblion.psu.edu/documentation/presentations/ui-and-theming/introduction-to-viewlets-in-plone-3-part-2-of-2/ 
) available.

hth, Thomas

Am 01.07.2009 um 00:47 schrieb Paul-Michael Agapow:

>
> An odd problem: I'm developing a theme that shifts a few viewlets from
> the header to the footer. However, when I uninstall the theme, the
> viewlets appear in the header _and_ the footer.
>
> Attempted solutions: restarting (nope), flushing caches and db (nope).
>
> Any ideas of where to look for this problem? Other themes that do this
> sort of thing (i.e. plonetheme.labs) don't seem to have this problem.
>
> --
> Paul A, (agapow@...)
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users

Thomas Massmann

EDV-Beratung Thomas Massmann - it-spir.it
Gottfried-Keller-Str. 13
04289 Leipzig

Tel: +49-341-5916261
Fax: +49+341-5916261

E-Mail: thomas.massmann@...
WWW: it-spir.it

------------------------------------------------------------------------------
albertpt | 1 Jul 2009 11:19
Picon

Import data from Oracle DB in XML format


Hi everybody,

I would need your help as I need to import data from an Oracle DB, which
returns the requested data on the queries in XML format. 

The idea I have is to copy the data to the ZODB, and then query the database
automatically every certain period of time in order to update the ZODB. 

Then, once having the data on the ZODB, the data should be loaded
automatically from the ZODB and the queries won't be necessary (avoiding
possible connection problems to retrieve the data).

My questions about it are the following: 

1. How to connect to an Oracle DB (I believe is the 10g veersion)? Which is
the best free adapter?

2. Where to put that piece of code to get the data on Plone? How to do that?

3. How to treat the returned data on XML to store it on the ZODB?

Not sure if it's possible, but I will be appreciating your help and
suggestions....

Best regards,
Albert.
--

-- 
View this message in context: http://n2.nabble.com/Import-data-from-Oracle-DB-in-XML-format-tp3188024p3188024.html
Sent from the General Questions mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Andreas Jung | 1 Jul 2009 11:28

Re: Import data from Oracle DB in XML format

On 01.07.09 11:19, albertpt wrote:
> Hi everybody,
>
> I would need your help as I need to import data from an Oracle DB, which
> returns the requested data on the queries in XML format. 
>   

You want to make Oracle-based content available within Plone as primary
content-objects? Or just display some data based some SQL magic
within the Plone UI?

-aj
Attachment (lists.vcf): text/x-vcard, 346 bytes
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Mayank Mathur | 1 Jul 2009 11:27
Favicon

Portlet with its publishing + expiry Date

hello
i want a portlet in my site, which should have a Publishing + expiration Date like Feature, feature we can found in articles, etc.
Actually, this portlet will be used for displaying conferences that'll be held in future. For eg, if conference starts from 3 july and ends up on 5 july, then this portlet should not be visible/get published before 3 july and after 5 July.

Is there any Portlet related available or i've to code it manually.
I've googled this and doesn't found any relevant answer.
Thanks
------ Regards, Mayank Mathur
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Mayank Mathur | 1 Jul 2009 11:30
Favicon

Re: Portlet with its publishing + expiry Date

or can i set it thru Properties tab of my custom PT ?

Mayank Mathur wrote:
hello
i want a portlet in my site, which should have a Publishing + expiration Date like Feature, feature we can found in articles, etc.
Actually, this portlet will be used for displaying conferences that'll be held in future. For eg, if conference starts from 3 july and ends up on 5 july, then this portlet should not be visible/get published before 3 july and after 5 July.

Is there any Portlet related available or i've to code it manually.
I've googled this and doesn't found any relevant answer.
Thanks
------ Regards, Mayank Mathur ------------------------------------------------------------------------------ _______________________________________________ Plone-Users mailing list Plone-Users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-users

-- ------ Regards, Mayank Mathur
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Andreas Jung | 1 Jul 2009 11:51

Re: Portlet with its publishing + expiry Date

What has a properties tab to do with that?

You have several months of Plone background and I would expect that you know
about the basic about Plone content objects like the effective and
modified date
and how to use them using a portal_catalog...please read up...those basics
are covered by The Zope Book, Martin Aspeli's book and various
documentations
on plone.org.

In addition you know about the 'classic' portlet where you can write a
simple
ZPT containing your portal_catalog query and code for rendering the results.

Andreas

On 01.07.09 11:30, Mayank Mathur wrote:
> or can i set it thru Properties tab of my custom PT ?
>
> Mayank Mathur wrote:
>> hello
>> i want a portlet in my site, which should have a *Publishing +
>> expiration Date* like Feature, feature we can found in articles, etc.
>> Actually, this portlet will be used for displaying conferences
>> that'll be held in future. For eg, if conference starts from 3 july
>> and ends up on 5 july, then this portlet should not be visible/get
>> published before 3 july and after 5 July.
>>
>> Is there any Portlet related available or i've to code it manually.
>> I've googled this and doesn't found any relevant answer.
>> Thanks
>>  
>> ------
>> Regards,
>> Mayank Mathur
>>   
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>>   
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Plone-Users mailing list
>> Plone-Users@...
>> https://lists.sourceforge.net/lists/listinfo/plone-users
>>   
>
> -- 
>
> ------
> Regards,
> Mayank Mathur
>   
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users
>   

--

-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info@... - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting

Attachment (lists.vcf): text/x-vcard, 346 bytes
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
steven s | 1 Jul 2009 12:34

Delete history revisions

Hi

I recall this being discussed before but am anable to find anything on it.
Is it possible to delete versions from the history?

Basically I want to clean up the history of a lot of the pages but cant find how to do it.
Is there a way to set a maximum number of revisions or delete all revisions?

Thanks
steven


------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Mayank Mathur | 1 Jul 2009 13:02
Favicon

Re: Portlet with its publishing + expiry Date

To be more precise, i already have PT created (PT will contain single Image and link on it to some external site), which will be displayed as portlets on Home Page, thru, "classic portlet", so by using Propt. tab, i mean to say that, can i set its effective + expiration date for PT's itself.
Also, im not using any content type inside my PT's here, as i described above.
I hope reqm. will be more clear now.

thanks.

Andreas Jung wrote:
What has a properties tab to do with that? You have several months of Plone background and I would expect that you know about the basic about Plone content objects like the effective and modified date and how to use them using a portal_catalog...please read up...those basics are covered by The Zope Book, Martin Aspeli's book and various documentations on plone.org. In addition you know about the 'classic' portlet where you can write a simple ZPT containing your portal_catalog query and code for rendering the results. Andreas On 01.07.09 11:30, Mayank Mathur wrote:
or can i set it thru Properties tab of my custom PT ? Mayank Mathur wrote:
hello i want a portlet in my site, which should have a *Publishing + expiration Date* like Feature, feature we can found in articles, etc. Actually, this portlet will be used for displaying conferences that'll be held in future. For eg, if conference starts from 3 july and ends up on 5 july, then this portlet should not be visible/get published before 3 july and after 5 July. Is there any Portlet related available or i've to code it manually. I've googled this and doesn't found any relevant answer. Thanks ------ Regards, Mayank Mathur ------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------ _______________________________________________ Plone-Users mailing list Plone-Users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-users
-- ------ Regards, Mayank Mathur ------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------ _______________________________________________ Plone-Users mailing list Plone-Users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/plone-users

-- ------ Regards, Mayank Mathur
------------------------------------------------------------------------------
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

Gmane