Newbie: how to access ZPT from plone?

classic Classic list List threaded Threaded
7 messages Options
Frank Miles Frank Miles
Reply | Threaded
Open this post in threaded view
|

Newbie: how to access ZPT from plone?

I've generated a simple ZPT file in Zope (as there was no 'add new item'
that looked like a ZPT from within Plone).  However, like other things
generated from within Zope, it doesn't seem to be accessible within Plone.

Please -- what is the Right Way to create ZPTs (or any other scripts for
that matter) so that they are accessible in Plone?

  TIA!

  -frank


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Laurence Rowe Laurence Rowe
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

Plone in common with other Zope CMF applications only shows content
types. Normally you'd put your custom templates and scripts in the
portal_skins/custom folder in the Zope
Management Interface, where through the magic of acquisition they are
available everywhere (just tag the name on to the end of a url to see
this). More rarely (perhaps you want to customise a script for just one
folder) you'd put it in that folder directly, and all of the children of
that folder will then acquire the copy of the script / template there.

In plone 2.1 you have the option to list your template as a view
template in the portal_types type information, that will make the
template available as an option from the display drop down.

If you really need them as content types, then you should roll your own
content types with Archetypes and TemplateFields and PythonFields from
http://svn.plone.org/view/archetypes/MoreFieldsAndWidgets/

Hope that helps,

Laurence




Frank Miles wrote:

> I've generated a simple ZPT file in Zope (as there was no 'add new item'
> that looked like a ZPT from within Plone).  However, like other things
> generated from within Zope, it doesn't seem to be accessible within Plone.
>
> Please -- what is the Right Way to create ZPTs (or any other scripts for
> that matter) so that they are accessible in Plone?
>
>     TIA!
>
>     -frank
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
J Cameron Cooper J Cameron Cooper
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

In reply to this post by Frank Miles
Frank Miles wrote:
> I've generated a simple ZPT file in Zope (as there was no 'add new item'
> that looked like a ZPT from within Plone).  However, like other things
> generated from within Zope, it doesn't seem to be accessible within Plone.
>
> Please -- what is the Right Way to create ZPTs (or any other scripts for
> that matter) so that they are accessible in Plone?

Generally you don't. ZPTs are for viewing data, not being data. In other
words, they are not content.

But if you really must do this, there's
http://www.zope.org/Members/ensane/CMFDynamicDocument

                --jcc
--
"When you're going through hell, keep going."
Winston Churchill


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
pshute pshute
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

In reply to this post by Frank Miles
You can also access them directly by appending their name to the end of a
URL, e.g.www.mysite/testfolder/testtemplate.  This assumes they are
available in the folder referenced by the URL.  They could be in that
folder, in a folder above that folder, or in a skin folder (usually the
custom folder).  This is a quick way to test a template.

On Tuesday, October 18, 2005 2:42 AM Frank Miles <[hidden email]>
wrote:

> [Plone-users] Newbie: how to access ZPT from plone?I've generated a
> simple ZPT file in Zope (as there was no 'add new item'
> that looked like a ZPT from within Plone).  However, like other things
> generated from within Zope, it doesn't seem to be accessible within
> Plone.
>
> Please -- what is the Right Way to create ZPTs (or any other scripts
> for
> that matter) so that they are accessible in Plone?



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Nick Davis Nick Davis
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

In reply to this post by Frank Miles
Frank Miles wrote:
> I've generated a simple ZPT file in Zope (as there was no 'add new item'
> that looked like a ZPT from within Plone).  However, like other things
> generated from within Zope, it doesn't seem to be accessible within Plone.
>
> Please -- what is the Right Way to create ZPTs (or any other scripts for
> that matter) so that they are accessible in Plone?
>

What are you trying to do?

If you're trying to simply learn about ZPTs with an idea to using them
in a Plone site, you need to know that ZPT is a Zope idea, and perhaps
play around with some ZPTs at the Zope level, through the ZMI, without
bothering about Plone yet. Help with this can be found through books
like the Zope book which is online, or the "Zope bible". However, as far
as I can tell you have to ignore big chunks of stuff in these books
about ZClasses or DTML as they are mostly superseded by ZPT.

When you understand what Zope does , then you have to know that Plone is
built on top of the CMF, which is built on top of Zope. On top of Plone
is Archetypes.

If you want to add content to a Plone site you probably want to use
Archetypes.

It can be difficult to learn because of the many layers.
A great starting point is here :

http://plone.org/documentation/how-to/read-documentation

Hope that helps,

Nick




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Frank Miles Frank Miles
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

In reply to this post by J Cameron Cooper
On Mon, 17 Oct 2005, J Cameron Cooper wrote:

> Frank Miles wrote:
>> I've generated a simple ZPT file in Zope (as there was no 'add new item'
>> that looked like a ZPT from within Plone).  However, like other things
>> generated from within Zope, it doesn't seem to be accessible within Plone.
>>
>> Please -- what is the Right Way to create ZPTs (or any other scripts for
>> that matter) so that they are accessible in Plone?
>
> Generally you don't. ZPTs are for viewing data, not being data. In other
> words, they are not content.
>
> But if you really must do this, there's
> http://www.zope.org/Members/ensane/CMFDynamicDocument
>
> --jcc
>
Ok, I've been properly chastized.  Let me ask another way that will hopefully
yield more useful results.  (And I think what I'm asking for should be a
pretty common situation).

Also-- the "plone way" seems to shun the use of CMFDynamicDocument.  I may be
misunderstanding things, but I don't think changing the "logic" of the site
by the DB content is needed.

I am trying to create a web site where a significant part of the site will
contain a varying and growing population of files to be downloaded.  Each of
these files is actually a ZIP archive containing specific information on
a particular subject.  In addition to the ZIP archive, there would be a
descriptive "header" page which conforms to a prescribed format and an image.
These will be grouped by subject/content.  Some of the files may change over
time; and certainly the overall volume is expected to grow with time.
The framework for the header pictures would be established
by a comparatively static set of pages -- er, documents, within plone.

It seems to me that the usual way of "hand editing" these files -- to add
and modify them -- would be tedious at best.  My (possibly delusional)
vision is that the header pages, images, and ZIP archives could be stored
in a database and read by ZPT/plone as needed.

If there is a better way to do this within plone, please point me in that
direction.  Alternatively, at this early point in the development of the site
it would be painful but not impossible to switch from plone to some other
(better suited) environment -- feel free to tell me if this is the case.

  -frank


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
David Siedband-4 David Siedband-4
Reply | Threaded
Open this post in threaded view
|

Re: Newbie: how to access ZPT from plone?

Frank,

You probably want to make an archetype for your content-type where  
you have a FileField to store the zip file and a TextField for the  
header page, and let people use kupu or an external editor to edit  
that HTML content.  Btw, you may want to use an alternate storage for  
the FileField so you don't grow your ZODB unnecessarily with those  
zip files.

cheers
--
David




On Oct 18, 2005, at 4:56 PM, Frank Miles wrote:

> I am trying to create a web site where a significant part of the  
> site will
> contain a varying and growing population of files to be  
> downloaded.  Each of
> these files is actually a ZIP archive containing specific  
> information on
> a particular subject.  In addition to the ZIP archive, there would  
> be a
> descriptive "header" page which conforms to a prescribed format and  
> an image.

[ ... ]

> If there is a better way to do this within plone, please point me  
> in that
> direction.  Alternatively, at this early point in the development  
> of the site
> it would be painful but not impossible to switch from plone to some  
> other
> (better suited) environment -- feel free to tell me if this is the  
> case.



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Plone-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users