[Zope] Building a Zope based site
How much do people charge for building a Zope based site? I've given up on trying to understand Zope myself as it's just too difficult, but suspect it can provide more functionality than other CMS systems. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Finding stylesheet
I would like to set up a page template to use the stylesheet my.css if it is in the current folder, but if not to use the one in the root folder. How do I specify this? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Finding stylesheet
On Mon, Mar 20, 2006 at 11:04:03AM -0500, Paul Winkler wrote: On Mon, Mar 20, 2006 at 03:44:02PM +, John Poltorak wrote: I would like to set up a page template to use the stylesheet my.css if it is in the current folder, but if not to use the one in the root folder. How do I specify this? This is a very common and basic usage of implicit acquisition. Something like: link rel=stylesheet type=text/css href= tal:attributes=href context/my.css/absolute_url / I did have that although it didn't work properly but I understand why now. If my.css contains background-image: url(images/background.gif); how would 'images/'be resolved? (Assuming I have an 'images folder in the current folder and its parent.) -- Paul Winkler http://www.slinkp.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Sample Zope Page Templates
Is there such a thing as a repository of sample Zope Page Templates? I don't mean sample code snippets but ZPT's that people use in real websites. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Using folder name in macro
How do I use a folder name in a macro? ie I want to change this metal:macro metal:use-macro=context/abc.pt/macros/page which is in the folder 'abc' to metal:macro metal:use-macro=context/[folder_name].pt/macros/page I don't know where to look this sort of thing up. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using folder name in macro
On Mon, Mar 13, 2006 at 11:27:19AM +0100, Andreas Jung wrote: --On 13. März 2006 10:21:15 + John Poltorak [EMAIL PROTECTED] wrote: How do I use a folder name in a macro? ie I want to change this metal:macro metal:use-macro=context/abc.pt/macros/page which is in the folder 'abc' to metal:macro metal:use-macro=context/[folder_name].pt/macros/page Your question makes little or no sense. Rather than telling me how stupid I am, how about trying to figure out what I'm having difficulty achieving? -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] METAL macros
On Mon, Mar 13, 2006 at 07:37:38AM +0100, Andreas Jung wrote: --On 12. März 2006 18:00:27 -0800 David [EMAIL PROTECTED] wrote: John Poltorak wrote: I'm having difficulty figuring out how to make METAL macros reusable. Hi John, This is about as simple as it gets (sorry if i misunderstood your question): (1) Name this page template ptMacros html body This is Page Template em tal:content=template/idtemplate id/em. p metal:define-macro=copyright Copyright 2001, emFoobar/em Inc. /p /body /html (2) name this page template ptTest html body This is Page Template em tal:content=template/idtemplate id/em. p metal:use-macro=container/ptMacros/macros/copyright b metal:fill-slot=nameCopyright goes here/b /p /body /html ...which is basically the same as in the Zope Book: http://www.plope.com/Books/2_7Edition/ZPT.stx#1-12 What this really needs is a sample website which shows how these snippets all work together. Trying to make sense of these little fragments in isolation is hard work. Is there an example of a small sample website which highlights the use of macros? -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] METAL macros
I'm having difficulty figuring out how to make METAL macros reusable. Is it standard practice to put macros into a common folder where they can be used by numerous different websites? I just can't get a handle on how they are supposed to be used. According to:- http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixC.stx Macros provide a way to define a chunk of presentation in one template, and share it in others, so that changes to the macro are immediately reflected in all of the places that share it. Additionally, macros are always fully expanded, even in a template's source text, so that the template appears very similar to its final rendering. This does not really tell me how they should be used. Can someone give me an example of real world usage? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Help needed to simplify some code
Several months ago someone provided me with me with some sample code which did exactly what I wanted, but looking at it again it looks a little unwieldy and could do with tidying up. It consists of:- span tal:define=opts python:here.lib.parse_file(file=here.news,sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:'news_items/' + opt[0]/a/li /tal:block /span which involves parsing a file containing two fields separated by ',' eg. 001,abc 002,jkl 003,xyz The second field is just a string which appears in a selection menu, and the first is the name of a folder which contains an object called 'content' which get displayed on selecting the correponding link. I know this is not a particularly elegant way of doing it, but after looking at some TAL examples just can't figure out the right way to do it. Some help in simplifying it would be appreciated. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How do I do this using Zope?
I would like to create a folder (news) which contains several news items, lets say news1, news2, news3. I would like to set up a menu box which lists all the news items in the news folder which when clicked on would load each one up. How do I code this up? (Hope someone understands what I'm getting at) -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How do I do this using Zope?
On Mon, Mar 06, 2006 at 02:20:56PM +0100, Andreas Jung wrote: --On 6. März 2006 14:17:05 +0100 Lennart Regebro [EMAIL PROTECTED] wrote: On 3/6/06, John Poltorak [EMAIL PROTECTED] wrote: I would like to create a folder (news) which contains several news items, lets say news1, news2, news3. I would like to set up a menu box which lists all the news items in the news folder which when clicked on would load each one up. How do I code this up? (Hope someone understands what I'm getting at) It sounds like you need a CMS. Take a look at CPS: Or Plone or Inungo. Never heard of Inungo. Is it easier to use than Plone? I found Plone very slow, as well as being difficult to use. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How do I do this using Zope?
On Mon, Mar 06, 2006 at 02:37:05PM +0100, Andreas Jung wrote: --On 6. März 2006 13:29:14 + John Poltorak [EMAIL PROTECTED] wrote: Never heard of Inungo. Is it easier to use than Plone? Google is your friend - iungo.org I know that Google is quite clever but Googling for Inungo did not lead me to iungo.org :-) -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] TAL tutorial
Can anyone point me to a good TAL tutorial for people who have difficulty getting to grips with it? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Mailman Zope
How do I configure a Mailman list for a website which is Zope based? I guess some entries in Apaches configuration file need to distinguish between Zope based pages and Apache pages for a given virtual host, but I've no idea how to do this. Can anyone give me an example? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zdsock
On Fri, Dec 09, 2005 at 10:48:49AM +, Chris Withers wrote: John Poltorak wrote: Are you saying that Zope cannot be restarted through ZMI on Windows? Who does that anyway? Even on unix, I use zopectl restart, That is the point - zopectl uses a socket - 'zdsock'. At the moment, the problem is being able to provide an alternative socket name via a command line parameter which is a feature that is supposed to be already provided by zdctl, but no one seems to know how it works, so I have no way of knowing whether it can be made to work on my OS or not. Well, I'm afraid that's how open source works. Yours is the itch, better get scratching ;-) Tres gave you some hints, in that basically you want to surface that ooption in zope.conf. Reading the code in the Zope.Startup package would be where I'd start, although I warn you it's a little contorted :-S Well maybe you can explain what is the point of the '-s' flag or sample.conf. Is it meant to be helpful? I don't even see it mentioned in the documentation. Am I missing something? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Remote Calendar Server
What do I need to do to set up Zope as a remote calendar server for Mozilla? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zdsock
On Wed, Dec 07, 2005 at 09:02:11AM -0500, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: Tres Seaver wrote: You have confused the server socket (which is set in the http-server section) with the daemon control socket (set in runner in the zeo.conf file; not currently settable in zope.conf). The control socket has to be a Unix-domain socket. John is asking to surface an existing zdaemon feature (already used in zeo.conf) within zope.conf. Ah, okay. How does this work on windows? zdaemon / zopectl *don't* work on windows. What's wrong with the default name? Th the original poster's case, his OS requires that Unix-domain sockets have mangled names. All I'm asking for at the moment is how to take advantage of what are supposed to be existing options of setting the socket name to something other than the default 'zdsock'. Presumably someone created the the '-s' option to zdctl for exactly this purpose. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDlutj+gerLs4ltQ4RAic1AJ9wJJp10xx/HJnPbKaRYNHtM05VvACgmyem 6w5fCXtXVKkdbTLYLMPjgBU= =rhQt -END PGP SIGNATURE- -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zdsock
On Tue, Dec 06, 2005 at 09:51:12AM +, Chris Withers wrote: John Poltorak wrote: Zope itself works fine when started via runzope, so what is the problem in trying to provide an alternate socket name? zdctl is supposed to accept an alternative socket name:- -s/--socket-name SOCKET -- Unix socket name for client (default zdsock) Unfortunately, I can't figure out any way to make use of this option. Why do you care about this? AGAIK, this is only to do with those weird unix file-like socket things, and shouldn't be worried about if you're using a normal tcp socket as you should be ;-) According to the docs it should be possible to specify an alternate socket name. I am unable to use the name 'zdsock' so would like to configure Zope to use a user specific socket name. Either it is possible or it isn't. So far no one has told me how I can use what are supposed to be existing features. I've even found a sample.conf which contains this runner # Harmless example program sleep 100 # Repeat the defaults backoff-limit 10 daemonTrue forever True socket-name zdsock exit-codes0,2 # user has no default umask 022 directory . default-to-interactive True hang-around False /runner but no one seems to know how/where this is can be used. What is the point in having features if no one knows how to use them? cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Calendar
On Mon, Dec 05, 2005 at 01:17:06PM +0800, Bakhtiar A Hamid wrote: I wanted something which looks like Plone Calendar - http://www.zope.org/Members/teyc/CalendarTag this has a howto (or is it in the readme), and with the necessary css, can look pretty much like plone's I'd like to see more examples of what can be done. Is there any way to create a calendar of events which are automatically highlighted when displaying the calendar? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zdsock
On Mon, Dec 05, 2005 at 08:50:30AM +, Chris Withers wrote: John Poltorak wrote: Because 'zdsock' is not an acceptable name. I am running on OS/2 and the path name must start with '\\socket\\'. Oooo, ow, that's gonna hurt... Zope itself works fine when started via runzope, so what is the problem in trying to provide an alternate socket name? zdctl is supposed to accept an alternative socket name:- -s/--socket-name SOCKET -- Unix socket name for client (default zdsock) Unfortunately, I can't figure out any way to make use of this option. Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Calendar
On Mon, Dec 05, 2005 at 05:08:19PM +0100, Lennart Regebro wrote: On 12/5/05, Lennart Regebro [EMAIL PROTECTED] wrote: I think this would be easier if you were more specific of what kind of features you want. Or you can just use CalZope. ;-) It is the most superfantasticmegacool calendar software ever. I know, because Martijn Faassen and I wrote it. :-D http://www.cps-project.org/sections/projects/calendar_server/features/ Is there so,ething missing here? http://www.cps-project.org/sections/about/screenshots/cps_sites_screenshots/ Is there an example of it in use anywhere? Can't tell if it works with just Zope or whether it needs Plone. Unbiasedly: Lennart Regebro, Nuxeo -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zdsock
How do I override the default name of zdsock for the socket used by Zope? I see socket-name defined in Zope/lib/python/zdaemon/sample.conf but have no idea what this sample.conf is used for. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zdsock
On Sun, Dec 04, 2005 at 09:51:22AM +0100, Andreas Jung wrote: --On 4. Dezember 2005 08:36:06 + John Poltorak [EMAIL PROTECTED] wrote: How do I override the default name of zdsock for the socket used by Zope? I see socket-name defined in Zope/lib/python/zdaemon/sample.conf but have no idea what this sample.conf is used for. Likely by including the file into your zope.conf. I haven't found any documentation for zope.conf anywhere and have no idea if runner is an acceptable keyword. At the top of sample.conf it says # Sample config file for zdctl.py and zdrun.py (which share a schema). This sounds like something other than zope.conf. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zdsock
On Sun, Dec 04, 2005 at 11:13:29AM +0100, Andreas Jung wrote: At the top of sample.conf it says # Sample config file for zdctl.py and zdrun.py (which share a schema). This sounds like something other than zope.conf. Is there a real need for you to touch the configuration. Also as very advanced Zope user I've never had the need to touch this configuration for any reason. So what are your reasons? I need to change the name of the socket. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zdsock
On Sun, Dec 04, 2005 at 11:32:15AM +0100, Andreas Jung wrote: WHY? Because 'zdsock' is not an acceptable name. I am running on OS/2 and the path name must start with '\\socket\\'. --On 4. Dezember 2005 10:26:03 + John Poltorak [EMAIL PROTECTED] wrote: On Sun, Dec 04, 2005 at 11:13:29AM +0100, Andreas Jung wrote: At the top of sample.conf it says # Sample config file for zdctl.py and zdrun.py (which share a schema). This sounds like something other than zope.conf. Is there a real need for you to touch the configuration. Also as very advanced Zope user I've never had the need to touch this configuration for any reason. So what are your reasons? I need to change the name of the socket. -aj -- John -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zdsock
On Sun, Dec 04, 2005 at 09:15:34AM -0500, Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Poltorak wrote: On Sun, Dec 04, 2005 at 11:32:15AM +0100, Andreas Jung wrote: WHY? Because 'zdsock' is not an acceptable name. I am running on OS/2 and the path name must start with '\\socket\\'. Johh, you are likely going to have to hack the 'socket-name' key into $SOFTWARE_HOME/lib/python/Zope2/zopeschema.xml (as a top-level option, I think, bound to 'sockname'; it might need to be a sub-option of 'zoperunner'). Tres, Do you mean ? $SOFTWARE_HOME/lib/python/Zope2/Startup/zopeschema.xml That is the location of such a file on my system. As for hacking schema's that is something I'm not familiar with so I might need a little hand holding before I manage to apply the change you suggest. sectiontype name=zoperunner description This section describes the options for zopectl. These options ... options, the command line option (short and long form) are given here too. /description multikey name=program required=no description The program(s) that will be run by the runner /description /multikey key name=daemon datatype=boolean required=no default=true description Command-line option: -d or --daemon. - call umask(022) /description /key How exactly do I hack the 'socket-name' key into the file? Would the file $SOFTWARE_HOME/lib/python/zdaemon/sample.conf be of any use in this matter? Please submit a patch (to http://www.zope.org/Collectors/Zope) when you get it working. It may take some time to get working... Tres - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDkvoF+gerLs4ltQ4RAk3CAJ94XslX9sOw6VmcC2JDaooIXmotmACgtP5X ymxZAWD9nZn3ZmoetoV/DhE= =IhnZ -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Which Zope version is installed?
How do I tell which Zope version is installed by looking at the file system? Is there anything like a 'version' file which would identify it? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope Message Board
What Message Board product is recommended for use with Zope? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Importing an image
Is there any way to import an image file using a url? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope Calendar
Is there a Zope Calendar app available which looks and works like Plone Calendar? I can't use Plone because it is too heavy for the avialable resources. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zForum installation
Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Zope Calendar
On Sat, Dec 03, 2005 at 08:37:31PM +0100, Michael Haubenwallner wrote: John Poltorak wrote: Is there a Zope Calendar app available which looks and works like Plone Calendar? I can't use Plone because it is too heavy for the avialable resources. Depends on what you need: I wanted something which looks like Plone Calendar - http://www.zope.org/Members/teyc/CalendarTag - http://www.zope.org/Members/malikz/CorpCalendar/ These don't seem to... Michael -- http://zope.org/Members/d2m http://planetzope.org -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zForum installation
On Sat, Dec 03, 2005 at 09:05:08PM +0100, Andreas Jung wrote: --On 3. Dezember 2005 19:50:34 + John Poltorak [EMAIL PROTECTED] wrote: Where can I find some installation notes for zForum? I haven't found anything in the package which tells me what to do. MAybe you should use Google. The first hit searching for zforum gives you this: http://www.zforum.org/ I have already downloaded zForum, and foolishly expected to find some installation instructions included. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] here/content
Can someone tell me how 'here/content' is translated in these lines? span tal:define=stx python:modules['Products'].PythonScripts.standard.structured_text; the_text here/content tal:content=structure python:stx(the_text) The structured text goes here. /span When I use the URL 'www.mysite.org' the above resolves fine, but if I use 'www.mysite.org:8080/mysite' I get a 'Resource not found' when selecting the same link from the homepage of the same site. Is there something I've overlooked? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Unable to start Zope
Following a server reboot, I can't get Zope to run. I get a socket error - permission denied. How do I identify and delete this open socket? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Unable to start Zope
Sorry about this... the email was from yesterday and escaped by mistake. My problems were relalted to mismatches of permissions and userids being used. On Mon, Oct 03, 2005 at 12:48:00PM +0100, John Poltorak wrote: Following a server reboot, I can't get Zope to run. I get a socket error - permission denied. How do I identify and delete this open socket? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope restart fails
Following a server restart in the last couple of days I have been unable to get Zope started. Is there anything in particular I should check for? Until the reboot Zope had been running for months without a problem, although it may not have been stopped correctly before the reboot. Should I need to delete any lockfiles that may have been left in existance or should they get deleted on restart? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope restart fails
On Mon, Oct 03, 2005 at 03:38:52PM -0400, Eric Banford wrote: At 03:21 PM 10/3/2005, John Poltorak wrote: Following a server restart in the last couple of days I have been unable to get Zope started. Is there anything in particular I should check for? Until the reboot Zope had been running for months without a problem, although it may not have been stopped correctly before the reboot. Should I need to delete any lockfiles that may have been left in existance or should they get deleted on restart? Have you tried restarting via the C:\Plone 2\Data\bin\runzope.bat file? This will open a command prompt and show you startup messages, including any errors that cannot be resolved. I'm using a remote Unix system. running 'sh zopectl start' appears to work but then Zope quickly falls over. Hope that help, Eric -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Starting a search from the correct folder
On Sat, Jul 02, 2005 at 05:03:06PM +0200, Andreas Jung wrote: --On 2. Juli 2005 15:52:52 +0100 John Poltorak [EMAIL PROTECTED] wrote: When you are ready to look up (in the hierarchy), then obj.aq_inner.aq_parent is the hierarchy parent of obj. Well that would be useful if I understood what you meant. Is there a suggested explanation anywhere with some sample code which uses this construct? This construct returns the *hierarchy* parent vs. the *acquisiton* parent. See Zope Dev Guide for details on Acquistion. I looked and saw numerous broken links but no sample code. It's only sample code which actually creates any meaning to many of these explanations. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Starting a search from the correct folder
I have some code which here:- divtal:loop tal:repeat=item python: request.PARENTS[-2::-1]gt; a href=ABSOLUTE_URL tal:attributes=href item/absolute_url tal:content=item/title_or_idPARENT TITLE OR ID/a /tal:loop/div ul tal:condition=python: context.objectValues(['Folder']) li tal:repeat=item python: context.objectValues(['Folder']) a href=ABSOLUTE_URL tal:attributes=href item/absolute_url tal:content=item/title_or_idSUB-OBJECT TITLE OR ID/a/li /ul which automatically generates links to a number of folders which is exactly what I want. Understanding that Zope could do something like this has taken me quite a bit of time, although I still don't understand how this code works. What it actualy does is list the folders in the current folder and then allows me to select one which generates a subsequent list. What I'd like to do is skip the first list. If I want to generate a list of folders in say the 'groups' folder, how would I change the code above? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Sequencing pages
On Tue, Jun 28, 2005 at 03:45:01PM -0500, J Cameron Cooper wrote: John Poltorak wrote: If I create individual pages for a website as sub folders of a sites main folder, how do I control the sequence of pages if I automatically generate a set of links to all the folders? I presume that under normal circumstances that sequence would be in alphabetical order of object ID. The standard folder lists its contents in unspecified order. In practice, it's in order of creation (I think.) Creation date sequence seems to explain the order I'm seeing. You can get ordered folders, which support changing the order. In fact, one ships with Zope in recent versions. Look for Folder (Ordered). I've often wondered what 'Folder (Ordered)' was for. Is there an example of its usage I can take a look at anywhere? --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Calendar for Zope
I quite like Plone's Calendar, but need something similar for Zope. Any recommendations? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calendar for Zope
On Wed, Jun 29, 2005 at 01:15:39PM +0200, Lennart Regebro wrote: On 6/29/05, John Poltorak [EMAIL PROTECTED] wrote: I quite like Plone's Calendar, but need something similar for Zope. Any recommendations? For those daring to be on the (b)leeding edge, there is CalZope, which is the non-CMF part of our new calendar project. It's based on Five, so you'll need Zope 3.0.0 or Zope 2.8. http://www.cps-project.org/sections/projects/calendar_server Sounds interesting... Is CPS something like an alternative to Plone? I've only just struggled to upgrade to Zope 2.7.3 so jumping to 2.8 fills me with some degree of trepidation. I'd have to be convinced that this calendar server was exactly what I was looking for. Is there a usable demo? -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Generating links from a list
The other week someone provided me with this snippet of code for generating links from a list containing a description and a link:- span tal:define=opts python:here.lib.parse_file(file=context.links,sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:opt[0]/a/li /tal:block /span This works fine, but now that I have used it in a template I'm finding that the link is being prepended with the location of the new object after selecting the original link. ie invoking the code above creates a link such as:- http://www.mysite.org/links/org-1 After selecting org-1 the new page displays as:- http://www.mysite.org/links/org-1/links/org-1 Is there something in the code above which generates the full URL? My links list consists of simple lines such as org-1,First link org-2,Second Link org-x,Another Link How do I prepend a hardcoded path to org-1 instead of what is getting generated? I would like to see the link for org-1 being generated as http://www.mysite.org/links/org-1 irrespective of the context. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Debugging a python routine
Can anyone suggest how I would go about debugging a Python routine like this through Zope? span tal:define=opts python:here.lib.parse_file(file=here.members,sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:opt[0]/a/li /tal:block /span -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Generating links from a list
On Mon, Jun 27, 2005 at 10:03:08AM -0600, Nikko Wolf wrote: John Poltorak wrote: My links list consists of simple lines such as org-1,First link org-2,Second Link org-x,Another Link How do I prepend a hardcoded path to org-1 instead of what is getting generated? I would like to see the link for org-1 being generated as http://www.mysite.org/links/org-1 Check the HREF attribute of the links in the generated HTML, and see what you are getting there; unrooted paths are appended (by the browser, not Zope) to the directory component of the source URL. For example: A HREF=org-2Second Link/A in a page at: http://mysite.org/links/org-1 should equate to: http://mysite.org/links/org-2 [If you're still having problems, be explicit on the HREF and the URL you are seeing.] And have you tried simply replacing org-1 in the File with http://www.mysite.org/links/org-1; ? Just tried - and that does work, but the actual site will be changing before long. Finally -- from the ZPT snippet, it looks like links is a File object, yet you put it in the URL that you say you wish. It's *sometimes* not a problem given Zope's sibling-acquisition when parsing paths, but could be. That's right 'links' simply contains a list of objects and descriptions as shown above. When a web page is displayed the objectname is prepended by the directory component. I assumed that Zope did that, but I guess I was wrong. What I really need is to change this line:- tal:attributes=href python:opt[0] to something like:- tal:attributes=href '/mysite/links/' python:opt[0] but I can't figure out how to prepend python:opt[0] with '/mysite/links/'. Any hints? G'Luck Nikko -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Sequencing pages
If I create individual pages for a website as sub folders of a sites main folder, how do I control the sequence of pages if I automatically generate a set of links to all the folders? I presume that under normal circumstances that sequence would be in alphabetical order of object ID. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Why the hell hasn't Page Templates taken over the world?
I found the question posed on the subject line whilst searching for information about ZPT's on a website called ZopeZen which appears now to have expired - I only found the reference in Google's cache. The question was posed about a year ago and seemed to be correctly answered by this post:- documentation maybe? Posted by nan at 2004-08-06 03:08 PM tal / metal / tales has a steep learning curve and the documentation is not that good at all ( I think on a printout it is 4 - 6 pages) E.g. the tal:on-error (which is extremly usefull) gets only one tiny paragraph. I think if it had a more comprehensive documentation (with LOTs of examples) it would not scare of new users that much as it does right now. It seems that I'm not the only one who woul like to see more examples of ZPTs. Is there a repository for examples of what you can do with ZPT's to make a web page look nicely set out? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Why the hell hasn't Page Templates taken over the world?
On Fri, Jun 24, 2005 at 12:09:32PM +0200, Andreas Jung wrote: --On 24. Juni 2005 10:56:12 +0100 John Poltorak [EMAIL PROTECTED] wrote: It seems that I'm not the only one who woul like to see more examples of ZPTs. Is there a repository for examples of what you can do with ZPT's to make a web page look nicely set out? What has ZPT to do with make a web page look nicely? ZPT produces HTML. The produces the HTML that is coming from your programming. If your ZPTs produce trash HTML then the pages will be rendered as trash. So it is up to you to produce correct HTML that looks somehow. But the implication that ZPT is responsible because your site look trashy is just stupid. Fix your HTMl, learn about web design, learn to use CSS but please stop your crying about things that are just not true or about technologies that you obviously don't understand. Maybe you should use some other framework that it is easier for you. Yes, maybe I should. Any suggestions? -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Search path for objects
Does Zope look anywhere apart from the current folder for objects which are specified like this:- ? link rel=Stylesheet type=text/css href=ploneCustom.css / I've cobbled together a website and can't work out where certain CSS tags are being specified. Is there a simple way to determine this? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] External editor for ZMI
What alternatives are there to editing objects through ZMI? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] External editor for ZMI
On Thu, Jun 23, 2005 at 11:49:19AM -0400, Paul Winkler wrote: On Thu, Jun 23, 2005 at 04:27:50PM +0100, John Poltorak wrote: What alternatives are there to editing objects through ZMI? ExternalEditor. Do you mean this? http://plope.com/software/ExternalEditor Are there any screen shots of it in action? I'm not exactly sure how it works, but have feeling it won't work for me. -- Paul Winkler http://www.slinkp.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Problems changing from DTML to ZPT
I'm attempting to convert a page which uses DTML into one which uses ZPT but can't get it to look the same. Can some kind person quickly check over my poor attempt to utilise ZPT to see what I've done wrong? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Batch folder creation
Thanks David, That works fine although it is a little crude. What I'd like to be able to do is create folders with names and titles derived from an external File where each line contains the name and title, separated by a comma. Guess I need to find out how to get python to read lines from a Zope File object On Wed, Jun 22, 2005 at 10:49:07AM -0700, David H wrote: John Poltorak wrote: Is there any way to create folders in batch? I need to create around 50 but don't fancy doing this manually. John, Put this in a python script and test. for n in range(10): container.manage_addFolder(id= str(n)) David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Reading lines from a Zope File object
What function is used to read lines from a Zope File object using Python? Is there any example of this anywhere? Doing a search for 'python read zope object' is just too generic to find any python code to do this. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Batch folder creation
Hi David, I'm used to using the term 'file'. I guess it isn't appropriate in this case since I'm not actually handling a file but a Zope File object. I'm not sure where to look to see how Python handles this... John On Thu, Jun 23, 2005 at 04:30:07PM -0700, David H wrote: John, Seems like external scripts and dictionaries are a theme today. You need to check python manuals for file handling. Its a simple implementation. Then you would parse out names and title and put them in a dictionary and return. then in replace range(1...10) as seen in earlier messages with something *like* for n in yourDictionary: container.manage_addFolder(id = n, title = yourDictionary[n]) David John Poltorak wrote: Thanks David, That works fine although it is a little crude. What I'd like to be able to do is create folders with names and titles derived from an external File where each line contains the name and title, separated by a comma. Guess I need to find out how to get python to read lines from a Zope File object On Wed, Jun 22, 2005 at 10:49:07AM -0700, David H wrote: John Poltorak wrote: Is there any way to create folders in batch? I need to create around 50 but don't fancy doing this manually. John, Put this in a python script and test. for n in range(10): container.manage_addFolder(id= str(n)) David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT contents slot
On Tue, Jun 21, 2005 at 04:46:55PM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is 'stxfile' the actual filename? I'm not concerned about it being structured initially - just want to see it working in principle with any file containg some text. It's the name of an object. I made up this name for your structure text file, in each of the folders A B C. You may call it as you will. Note: there is no such thing as a file in the ZODB. Everything is an object. Really? You should try clicking on the drop down menu near the Add button of ZMI. That allows you to create a file ;-)... This is how content is viewed. One thing I forgot to mention: you would apply this template (say it's named 'special_view') to your folders, like: http://localhost/A/special_view http://localhost/B/special_view http://localhost/C/special_view Now, if we used a template like this (let's name it 'direct_view'):: divI'm a header/div p tal:replace=structure context/CookedBody This is sample page content /p divI'm a footer/div we could apply it like so:: http://localhost/A/stxfile/direct_view http://localhost/B/stxfile/direct_view http://localhost/C/stxfile/direct_view This is a much more typical pattern, at least for content. If you want to apply a wrapper to page templates, then you use macros. I can't say I understood much of that, but this web page gave me an example of exactly what I wanted to do:- http://www.zopelabs.com/cookbook/1092772190 Here is the code snippet which looks somewhat different to that which you suggested, or is it basically the same? html body !-- assume there is a file or other object containing structured text, and it's called foobar. -- span tal:define=stx python:modules['Products'].PythonScripts.standard.structured_text; the_text here/foobar tal:content=structure python:stx(the_text) The structured text goes here. /span /body /html The problem is finding such examples, but at least in this instance I've learnt something, so thanks for the help. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT tutorial
On Tue, Jun 21, 2005 at 11:04:12PM +0100, Mark Barratt wrote: John Poltorak wrote: I was on a course over the weekend where ordinary people in their 70's with no technical ability were knocking together websites in just a few hours with no prior training and no understanding of the underlying concepts involved. Why should Zope be just as easy? Because Zope is hard. You can make some great sites/applications with Zope but for all except the very simplest you need . advanced understanding of html and xml or . a thorough grounding in programming principles or . a working knowledge of Python - and preferably all three. Whilst Zope can be used for developing extremely complex sites, that shouldn't preclude it as a development tool for simple sites. I think expertise only develops through extended usage of Zope, but there is just so much to learn, although I don't see a need to be an expert in numerous fields before touching Zope. Most (not all) of the people who hang out here have all three of these skill sets, and like many skilled people, they find it hard to understand that the skills they have seem arcane to beginners. You should also understand that nobody (AFAIK) is 'them' with an interest in making Zope easy and helping you. You depend on the kindness of strangers, so politeness and gratitude pay. Yes, I am aware of this. I also think that this list is not really appropriate for newbies, but in the absence of an alternative, this is where I ask my newbie questions. In addition, Zope is heading fast into even less friendly territory. DTML, which is technically 'mucky' but reasonably easy to grasp for non-programmers, is increasingly deprecated. Through-the-web editing likewise. I'm not saying these trends are bad, just that they are happening, they make the learning curve steeper, and that they lock out almost all casual users unless they have the skills noted above. The alternative in the Zope world is Plone, where you can get a site up and rolling in very little time (as long as you are happy for it to look and operate like almost every other Plone site on the planet). I looked at Plone but it is way too slow for the server I'm using. Besides that customisation looks like another learning cliff. or there's PHP, where the communities are probably more newbie-friendly and there are loads of tutorials. I'm sufficiently aware of Zope to know it provides a far more comprehensive build environment than PHP ever will and I would like to adopt it as my platform of choice, but it would be nice if the ZOPE support community was as newbie-friendly as the PHP crowd. Loads of tutorials and worked examples would be nice too. Reading a manual is no substitute for being shown how to build a web page using ZOPE and just reading through dozens of isolated examples of ZPT techniques makes progress very slow. I would much rather see a tutorial which starts of with a relatively complex but easily reproducible template which creates an interesting page, but then proceeds to de-construct what it does and how it does it. or you could decide that Zope does some stuff which you must have, in which case David H's stereotypical response If you spent more time just *learning* Zope and HTML, etc and less time rationalizing your lack of progress everyone would be happy. is appropriate. I only need to rationlise it when people constantly keep telling me to read the Zope Book as if that is the solution to everything. Fortunately there are a few people here who can still remember suffering the same plight as I am currently in an I'm grateful to them for their help. Good luck. -- Mark Barratt Text Matters Information design: we help explain things using language | design | systems | process improvement __ phone +44 (0)118 986 8313 email [EMAIL PROTECTED] skype mark_barratt web http://www.textmatters.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZopeZoo
In my quest to get to grips with the basics of ZPT I eventually stumbled across ZopeZoo which I found very useful. Looking at it again, there seem to be several variations of the same examples. I used this one:- http://www.plope.com/Books/2_7Edition/SimpleExamples.stx#2-10 but find there are a couple of variations here:- http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/SimpleExamples.stx http://www.zope.org/Members/jwhitener/zopeZoo_2_6 Is there a definitive site for ZopeZoo? And is there a followup anywhere? I found I was getting the hang of it but could have done with a part two to show how to incorporate various divisions such as columns under ZPT. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Batch folder creation
Is there any way to create folders in batch? I need to create around 50 but don't fancy doing this manually. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT tutorial
On Tue, Jun 21, 2005 at 01:24:18AM +0200, Andreas Pakulat wrote: On 20.Jun 2005 - 23:45:34, John Poltorak wrote: Does a ZPT tutorial exist anywhere? How about the 2 chapters in the Zope book? I just don't find this book very helpful at all. It's written as a manual rather than tutorial and reminds me of a book which explains how to chop down a tree if you are interested in putting up some bookshelves. What I did find useful, though, was this worked example of how to put together a simple application:- http://www.plope.com/Books/2_7Edition/SimpleExamples.stx#1-6 That was much more useful than anything else I've come across so. Just wish there were a few more examples. Andreas -- -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZPT code sample
Is there anything wrong with this ZPT code sample? http://www.zopemag.com/Issue003/Section_Articles/article_ZPTintro_code.html I get this error message when trying to save it:- HTMLParser.HTMLParseError: malformed start tag, at line 8, column 37 -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT tutorial
On Tue, Jun 21, 2005 at 07:04:48PM +0100, Peter Bengtsson wrote: How about the 2 chapters in the Zope book? I just don't find this book very helpful at all. It's written as a manual rather than tutorial and reminds me of a book which explains how to chop down a tree if you are interested in putting up some bookshelves. What I did find useful, though, was this worked example of how to put together a simple application:- http://www.plope.com/Books/2_7Edition/SimpleExamples.stx#1-6 That was much more useful than anything else I've come across so. Just wish there were a few more examples. Interesting. If you like examples, be sure to get familiar with Zopelabs.com (zope cookbook) It probably is very useful, but I know I'd get hopelessly lost because there is just so much stuff on it. Most of the newbie stuff about macros is probably quite old by now so I doubt whether I'd find it with a sequential browse through the Cookbook. It's disappointing to find that the link from Newbies under the ZOPE section does not function. What I really need is something like a ZPT macro which defines a header and footer and leaves a slot in the middle for my own content. I don't expect to be able to write my own macro for quite a while - too many pitfalls... I'm not even sure is that is how I should be approaching writing a home page. Andreas -- -- John -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT code sample
On Tue, Jun 21, 2005 at 06:07:36PM +0200, Andreas Jung wrote: --On 21. Juni 2005 11:58:52 -0400 Fred Drake [EMAIL PROTECTED] wrote: On 6/21/05, John Poltorak [EMAIL PROTECTED] wrote: Is there anything wrong with this ZPT code sample? http://www.zopemag.com/Issue003/Section_Articles/article_ZPTintro_code.h tml I get this error message when trying to save it:- HTMLParser.HTMLParseError: malformed start tag, at line 8, column 37 The cited line contains a typo; it uses instead of to end a tag. ...which is obvious when you look in line 8 carefully. It may well be obvious to anyone familiar with these things, but when you are struggling to understand them, the last thing you need when you are going through the most basic example is a typo in the example itself. I keep wondering whether ZOPE is sponsored by wig makers... -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZPT contents slot
If I create a macro which defines a slot called 'content', is there any way to have that slot populated by a file with a specific name if it exists in a folder? What I'd like to do is create a structure text file, in each of the folders A B C and have it automatically loaded into a content slot of a master template whenever the options A B C are selected. Can I do that, and if so how? I have spent all day looking at ZPT references and have no idea if what I'd like to do is possible. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT code sample
On Tue, Jun 21, 2005 at 10:25:24PM +0200, Andreas Jung wrote: --On 21. Juni 2005 19:37:35 +0100 John Poltorak [EMAIL PROTECTED] wrote: On Tue, Jun 21, 2005 at 06:07:36PM +0200, Andreas Jung wrote: It may well be obvious to anyone familiar with these things, but when you are struggling to understand them, the last thing you need when you are going through the most basic example is a typo in the example itself. I keep wondering whether ZOPE is sponsored by wig makers... I don't know what a wig maker is A wig is something one might look for after tearing one's hair out - a state one often gets into when using Zope. but when you work with ZPT you should have a certain knowledge in HTML and finding unmatched tag ends is something I consider really basic and which is support by nearly every text editor. Does Zope's built-in text editor include such support? -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT contents slot
On Tue, Jun 21, 2005 at 03:16:11PM -0500, J Cameron Cooper wrote: John Poltorak wrote: If I create a macro which defines a slot called 'content', is there any way to have that slot populated by a file with a specific name if it exists in a folder? What I'd like to do is create a structure text file, in each of the folders A B C and have it automatically loaded into a content slot of a master template whenever the options A B C are selected. Can I do that, and if so how? I have spent all day looking at ZPT references and have no idea if what I'd like to do is possible. You don't have to involve macros:: divI'm a header/div p tal:condition=exists:context/stxfile tal:replace=structure context/stxfile/CookedBody This is sample page content /p divI'm a footer/div If 'stxfile' can be aquired, what it renders will be included as page structure. (You may need to use a different method one the end of the path to render the object; for Documents, this is 'CookedBody'.) Otherwise, nothing will be rendered, though you could add a block with the oposite condition to supply a default action. Is 'stxfile' the actual filename? I'm not concerned about it being structured initially - just want to see it working in principle with any file containg some text. If you do not want the effects of acquisition, you may say instead:: tal:condition=exists:context/aq_explicit/stxfile since Zope assumes you generally want acquisition. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZPT tutorial
On Tue, Jun 21, 2005 at 03:15:33PM -0400, Paul Winkler wrote: On Tue, Jun 21, 2005 at 07:29:20PM +0100, John Poltorak wrote: re. zopelabs.com: It probably is very useful, but I know I'd get hopelessly lost because there is just so much stuff on it. So you prefer to ignore it? Just how much time should you spend on something when you are deriving no benefit just increasing frustration? Granted, zopelabs.com has flaws. It's harder to find stuff than it should be. Nevertheless, browsing that site, along with reading the Zope book (the old print version), was instrumental in getting me from knowing nothing, to the point where I became a full-time zope developer. We didn't even have the great resource of zopewiki.org back then. Use that too, zopewiki is your friend. There are tons of good links from http://zopewiki.org/PageTemplates Thanks. I'll check that. In general, I don't know how you expect to make any progress when your typical response to the (many) suggestions you receive on this list is I can't read that, it's too much work. If I spend a couple of days on something and make no progress, I'd say it's 'too much work'. Wouldn't you. I was on a course over the weekend where ordinary people in their 70's with no technical ability were knocking together websites in just a few hours with no prior training and no understanding of the underlying concepts involved. Why should Zope be just as easy? Most of the newbie stuff about macros is probably quite old by now so I doubt whether I'd find it with a sequential browse through the Cookbook. probably? doubt? It's disappointing to find that the link from Newbies under the ZOPE section does not function. True that. I don't know what happened to zopenewbies.net. What I really need is something like a ZPT macro which defines a header and footer and leaves a slot in the middle for my own content. I don't expect to be able to write my own macro for quite a while - too many pitfalls... I'm not even sure is that is how I should be approaching writing a home page. Have you tried the tutorial that comes with Zope? It includes at least one simple example of macros - see lesson 4. Not sure how to run the tutorial? The default index_html for a new Zope server tells you: There is a built-in interactive Zope Tutorial which gets you started with some simple tasks using the Zope managment interface. To use the tutorial, go to any Folder and select Zope Tutorial from the add list and click the Add button. Provide a name for the tutorial and click Add to begin working with the tutorial. There is a quantum leap between the tutorial and being able to do anything useful with a website. What the tutorial needs to to handhold you through putting together something like the homepage of zope.org. -- Paul Winkler http://www.slinkp.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing parameters using DTML
On Fri, Jun 17, 2005 at 05:39:23PM -0500, J Cameron Cooper wrote: I'm assuming the above line comes from a page template. You neglected to mention what the calling DTML looks like, but I *guess* that it was something like this: dtml-var some_template(parm='ABC') yes? no? This is what I have:- dtml-var expr=testlist(parm='myobjectname') I wish to get 'myobjectname' into this line in 'testlist' which is marked with * python:here.parse_file(file=context.**,sepr=',',clone=1) There must be a simple way of doing this, but I haven't come across an example of it and I've spent most of the day on it. Taking the options from my previous email and putting them together, you can say:: python:here.parse_file(file=getattr(context,options.parm),...) to get the attribute on the current context named 'myobjectname' or whatever else you provide as the 'parm' parameter on 'testlist'. Many thanks. I appreciate the help. I think I've incorporated your suggestion into the code below... html body span tal:define=opts python:here.parse_file(file=getattr(context,options.parm),sepr=',',clone=1) tal:block repeat=opt opts lia tal:content=python:opt[1] tal:attributes=href python:opt[0]/a/li /tal:block /span /body /html Unfortunately, when I try to use this expression dtml-var expr=testlist(parm='links') I get this Zope error:- Error Type: AttributeError Error Value: 'dict' object has no attribute 'parm' Can't help thinking it is a simple syntax error - missing bracker, quote etc... but just can't figure it out. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ Enfold Systems, LLC http://www.enfoldsystems.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZPT tutorial
Does a ZPT tutorial exist anywhere? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Graphical front end for Zope?
I don't suppose there is such a thing as a graphical front end for building Zope sites... I've just been trying out a Flash based product called SiteMaker http://www.moonfruit.com/ which made designing web pages a doddle. Just wish there was something which would simplify the building of a Zope site. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Passing parameters using DTML
Can someone provide an example of passing parameters using DTML? I'm sure this must be doable, but don't see an example in the Zope Book. I assume it would go something like dtml-var var1 parm1 parm2 but how would var1 pick up parm1 parm2? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Picking up a parameter in a ZPT
I'm trying to work out how to pass parameters between various modules running under Zope and have got stuck. In the line below, I need to replace the word 'links' with a variable passed by the calling program python:here.parse_file(file=context.links,sepr=',',clone=1) I know I can pass the variable using:- dtml-var expr=test2(parm='links') Just don't know how to reference it under ZPT. Help! -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing parameters using DTML
On Fri, Jun 17, 2005 at 07:09:04PM +0200, Dieter Maurer wrote: Tino Wildenhain wrote at 2005-6-17 10:57 +0200: ... Not at all. You could either have tried it out ;) Or looked at the DTML documentation in the Zope book *wink* ;) dtml-var expr=somemethod(parm1=value1,parm2=value2) Be warned: this is likely to cause loss of the namespace. Do not forget to pass the two positional arguments (usually as None, _). They are essential. For more details, read Calling DTML Objects of http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html That looks useful. Is there also something which explains how to call ZPTs from a DTML object? I'm unable to pick up a passed parameter. This is what I've conjured up:- python:here.lib.parse_file(file=context.options['parm'],sepr=',',clone=1) hoping that options['parm'] would get resolved as ABC but it doesn't. Any ideas? -- Dieter -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing parameters using DTML
On Fri, Jun 17, 2005 at 09:31:44PM +0200, Andreas Jung wrote: --On 17. Juni 2005 20:24:23 +0100 John Poltorak [EMAIL PROTECTED] wrote: Is there also something which explains how to call ZPTs from a DTML object? Do you have a good reason for mixing ZPT and DTML? Yes. I have a routine which works, but currently is uses a hard coded object names so I need to have lots of similar objects. I'm just trying to create something generic to simplify things. It's taken me several weeks to get this far and I don't feel like scrapping everything and spending a few months learning something entirely different which only gurus can handle. -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing parameters using DTML
On Fri, Jun 17, 2005 at 05:07:32PM -0400, Paul Winkler wrote: On Fri, Jun 17, 2005 at 08:24:23PM +0100, John Poltorak wrote: Is there also something which explains how to call ZPTs from a DTML object? I'm unable to pick up a passed parameter. This is what I've conjured up:- python:here.lib.parse_file(file=context.options['parm'],sepr=',',clone=1) hoping that options['parm'] would get resolved as ABC but it doesn't. John, please, *always* provide tracebacks instead of saying things like it doesn't. Any ideas? Without a traceback, everything I say below is guesswork. I'm assuming the above line comes from a page template. You neglected to mention what the calling DTML looks like, but I *guess* that it was something like this: dtml-var some_template(parm='ABC') yes? no? This is what I have:- dtml-var expr=testlist(parm='myobjectname') I wish to get 'myobjectname' into this line in 'testlist' which is marked with * python:here.parse_file(file=context.**,sepr=',',clone=1) There must be a simple way of doing this, but I haven't come across an example of it and I've spent most of the day on it. I am pretty sure that your problem is with the expression context.options['parm']. Why do I say this? Hint 1: Look at that expression from left to right. Hint 2: Think about what context.options means. In general, if you have not, you really should read the whole of http://www.plope.com/Books/2_7Edition/BasicScripting.stx and http://www.plope.com/Books/2_7Edition/ScriptingZope.stx ... not just once but several times :-) There is too much to read and understand. Much of it only ever makes any sense in retrospect. Manuals are not a very useful way of learning how to do something Taken together, they answer all how to call X from Y questions. I'm sure they do, if you can make any sense of it. -- Paul Winkler http://www.slinkp.com -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] IE v. Firefox for viewing Zope sites
I've just put together a simple Zope website, but whilst it renders properly under Firefox, it looks dreadful using IE. Can anyone explain why? Could it be the CSS? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] IE v. Firefox for viewing Zope sites
On Thu, Jun 16, 2005 at 08:30:15PM +0200, Andreas Jung wrote: --On 16. Juni 2005 19:15:58 +0100 John Poltorak [EMAIL PROTECTED] wrote: I've just put together a simple Zope website, but whilst it renders properly under Firefox, it looks dreadful using IE. Can anyone explain why? Could it be the CSS? It could be your IE? It could be your HTML? It could be your CSS? I was advised to change base href=/ / to base href=http://www.mysite.org/; / and that seemed to sort out most of the problems. Do I really need to hard code the site name like this, or is there some variable I can use? -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Deconstructing a Zope site
I have looked at numerous examples of Zope websites, but have no idea about how to go about creating anything similar. Is there any way to deconstruct a Zope site to see all the elements of its makeup? An example of how to build a professional looking site would be nice. Are there any samples/templates anywhere? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Repository for common python scripts
Can anyone recommend a way of setting up a library of common python scripts? I'd like to put such scripts in a shared area. If I created a folder called common and move parse_file there, how should I recode this line? python:here.parse_file(file=context.links,sepr=',',clone=1) -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Repository for common python scripts
On Wed, Jun 15, 2005 at 02:48:32PM +0200, Pascal Peregrina wrote: here.common.parse_file() should work. Indeed it does. Many thanks! Pascal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Poltorak Sent: 15 June 2005 13:37 To: zope@zope.org Subject: [Zope] Repository for common python scripts Can anyone recommend a way of setting up a library of common python scripts? I'd like to put such scripts in a shared area. If I created a folder called common and move parse_file there, how should I recode this line? python:here.parse_file(file=context.links,sepr=',',clone=1) -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How to overlay one column of a page
I need some advice on how to format a page and am not sure how to explain what I want to do but hope someone will figure out what I want to do... Basically I have a home page consisting of a standard header and footer, and three columns - the left and right ones also being standard, with only the middle column having content specific to a given page. What I would like to do in the left column is have a set of links to other pages on the same website with the content of each of those links overlaying the middle column. There must be a fairly straightforward way of doing this using minimal codeing, but I can't figure it out. Can anyone give me a pointer to some sample code? And if it's in the Zope book, can you tell me where? -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to overlay one column of a page
Andreas, All you ever say is RTFZB! Which Zope Book are you referring to? Zope changes so quickly, that I have learned not to trust any documentation which refers to a version older than the one I am using. -- John On Sun, Jun 05, 2005 at 12:53:29PM +0200, Andreas Jung wrote: --On 5. Juni 2005 11:33:42 +0100 John Poltorak [EMAIL PROTECTED] wrote: I need some advice on how to format a page and am not sure how to explain what I want to do but hope someone will figure out what I want to do... Basically I have a home page consisting of a standard header and footer, and three columns - the left and right ones also being standard, with only the middle column having content specific to a given page. What I would like to do in the left column is have a set of links to other pages on the same website with the content of each of those links overlaying the middle column. There must be a fairly straightforward way of doing this using minimal codeing, but I can't figure it out. Can anyone give me a pointer to some sample code? Create a ZPT and divide your template into slots (metal:define-slot) and fill the content using metal:fill-slot. Everything's documented in the Zope Book (there are *three* chapters on ZPT). -aj ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to overlay one column of a page
On Sun, Jun 05, 2005 at 08:05:10PM +0200, Andreas Jung wrote: --On 5. Juni 2005 12:11:50 +0100 John Poltorak [EMAIL PROTECTED] wrote: Andreas, All you ever say is RTFZB! Which Zope Book are you referring to? There is only one official documentation to which almost people refer as The Zope Book: http://www.zope.org/Documentation/Books/ZopeBook/ I did assume you had this in your hand or acrobat reader considering the time you are on the list :-) The Zope Book is usually the first documentation any Zope user starts with *wink* I thought you may have meant this... http://www.plope.com/Books/2_7Edition -aj -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to overlay one column of a page
On Sun, Jun 05, 2005 at 09:12:58AM -0700, David H wrote: Andreas Jung wrote: --On 5. Juni 2005 11:33:42 +0100 John Poltorak [EMAIL PROTECTED] wrote: I need some advice on how to format a page and am not sure how to explain what I want to do but hope someone will figure out what I want to do... Basically I have a home page consisting of a standard header and footer, and three columns - the left and right ones also being standard, with only the middle column having content specific to a given page. What I would like to do in the left column is have a set of links to other pages on the same website with the content of each of those links overlaying the middle column. There must be a fairly straightforward way of doing this using minimal codeing, but I can't figure it out. Can anyone give me a pointer to some sample code? Create a ZPT and divide your template into slots (metal:define-slot) and fill the content using metal:fill-slot. Everything's documented in the Zope Book (there are *three* chapters on ZPT). -aj John, You might also research/google css and columns. You may find that cascading style sheets are a big assist in this area I may well do, but I don't expect this to happen any time soon since I have no idea how. (in conjunction with Andreas suggestion). I have major problems trying to make any sense out of many parts of the Zope Book. Here is a typical section introducing ZPTs:- Now, log into your Zope and create a folder called FileLib. In this folder, create a page template called index_html by selecting Page Template from the add menu, specifying the id index_html in the form, and clicking Add. Now, with your editor, save the above HTML to the URL http://your.zope/FileLib/index_html/source.html. Notice that the URL to save the index_html page ends in source.html. Because page templates are dynamic, you need a way to edit the raw source of the template, unrendered by the page template language. Appending source.html to a page template gives you this raw source. If this makes sense to anyone else, can someone explain it to me? To me, it says create a file called index_html - no idea what should go into it... and then paste the contents of an example into a file called index_html/source.html. David -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calling a page template from a DTML document
On Fri, Jun 03, 2005 at 11:26:40AM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. Just call it exactly like you might do with, well, anything else:: dtml-var somepatetemplate Did you try this? Not until you suggested it. I'm a bit of a slow learner, and there is so much to learn... Next I have to figure out how to pass parameters to the template. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Calling a page template from a DTML document
Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How to read a file object
How do I go about reading a Zope file object in Python? I'd appreciate it if anyone could point me to a repository of small code snippets which illustrate some simple techniques usable in Python scripts running under Zope. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to read a file object
On Wed, Jun 01, 2005 at 12:46:44PM +0200, Andreas Jung wrote: --On 1. Juni 2005 10:01:22 +0100 John Poltorak [EMAIL PROTECTED] wrote: How do I go about reading a Zope file object in Python? Define what reading a Zope File object means? You mean you want the body of an upload file? -aj I mean the thing that is created when I click on 'File' from the drop down menu of ZMI. I'm trying to learn some Python basics and hoping to use Zope as front end for writing and running a few snippets of code which may help me get a better understanding of how Zope and Python interact. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Tue, May 31, 2005 at 07:17:46PM +0300, Vital Lobachevsky wrote: John Poltorak wrote: On Tue, May 31, 2005 at 06:23:11PM +0300, Vital Lobachevsky wrote: John Poltorak wrote: I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it. Any ideas? Well, it's really easy. Create 'linkList' (Python Script) in the folder where you page lives or somewhere higher in folder hierarchy: ## Script (Python) linkList return [ ('http://www.google.com/', 'Google'), ('http://www.yahoo.com/', 'Yahoo'), ] If your page is Page Template, it maybe something like this html body h1Search Engines/h1 tal:block repeat=item here/linkList a tal:content=python:item[1] tal:attributes=href python:item[0]/abr / /tal:block /body /html If you page is DTML Method, you can do the same using dtml-in tag. How would I extend this so that the Python script could read data from an independently maintained text file which could uploaded periodically? ie using a file containing something like:- http://www.google.com/,Google http://www.yahoo.com/,Yahoo -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Wed, Jun 01, 2005 at 11:05:04AM -0500, J Cameron Cooper wrote: John Poltorak wrote: On Tue, May 31, 2005 at 07:17:46PM +0300, Vital Lobachevsky wrote: John Poltorak wrote: Well, it's really easy. Create 'linkList' (Python Script) in the folder where you page lives or somewhere higher in folder hierarchy: ## Script (Python) linkList return [ ('http://www.google.com/', 'Google'), ('http://www.yahoo.com/', 'Yahoo'), ] If your page is Page Template, it maybe something like this html body h1Search Engines/h1 tal:block repeat=item here/linkList a tal:content=python:item[1] tal:attributes=href python:item[0]/abr / /tal:block /body /html If you page is DTML Method, you can do the same using dtml-in tag. How would I extend this so that the Python script could read data from an independently maintained text file which could uploaded periodically? ie using a file containing something like:- http://www.google.com/,Google http://www.yahoo.com/,Yahoo To get to the local file system, you must use an external method, which works very much like a Python script, but gets its code from a Python file on the file system. This is for security. You can read all about this in the Zope book. Your external method should return a list just like the Python script above. How you generate it is up to you. For your file format example, you could use the Python 'file' object's 'readlines' method and use 'split' to decode the lines:: f = open('myfile.links') retval = () for line in f.readlines(): elt = line.split(',') retval += (elt,) return retval You might also be able to use the 'csv' module. Now, if you're uploading files to Zope, rather than the file system, it's a little different, in that you have to get the data from an object, and you'll probably have to split it by newline yourself. This is the way I had been thinking of setting it up, but can't find an example of opening and reading such an object. I thought there may be something here:- http://www.plope.com/Books/2_7Edition/BasicScripting.stx#1-2 but couldn't find anything which looked relevant. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Creating links dynamically
I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it. Any ideas? I'd be quite happy to have the links in a text file with one link per line. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Tue, May 31, 2005 at 06:23:11PM +0300, Vital Lobachevsky wrote: John Poltorak wrote: I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it. Any ideas? I'd be quite happy to have the links in a text file with one link per line. 1) Create a script that returns a list of links: ## Script (Python) linkList return [ 'link1', ... 'linkN' ] 2) Use this script on your page. For example, tal:block repeat=link here/linkList span tal:replace=structure link / /tal:block Many thanks for your suggestion. Is there a worked example of doing this anywhere? There seem to be quite a few steps involved in trying to get this working and I'm no expert in writing python scripts, and it will probably take me a couple of days to get this working. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Tue, May 31, 2005 at 08:54:30PM +0200, Dieter Maurer wrote: John Poltorak wrote at 2005-5-31 16:39 +0100: ... Many thanks for your suggestion. Is there a worked example of doing this anywhere? The CMF's ActionsTool is a prime example for such a link factory. CMFDefaults main_template.pt demonstrates how to iterate over the links generated by portal_actions (the ActionsTool instance in a CMF site). Does that mean creating a CMF site? I'm finding it hard enough figuring stuff out without adding CMF into the mix... -- Dieter -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Tue, May 31, 2005 at 02:51:18PM -0500, J Cameron Cooper wrote: John Poltorak wrote: Well, it's really easy. Create 'linkList' (Python Script) in the folder where you page lives or somewhere higher in folder hierarchy: ## Script (Python) linkList return [ ('http://www.google.com/', 'Google'), ('http://www.yahoo.com/', 'Yahoo'), ] If you page is DTML Method, you can do the same using dtml-in tag. Thanks for the suggestion, but I really am a novice when it comes to all this and you are probably presuming more expertise than I have. I created a Page Template exactly as you suggested. It's called test and is in the testsite folder - the contents are pasted from your example. The python script was pasted into a file object called linkList which has a Content Type of text/x-unknown-content-type. Why did you put it in a File? Why not a Script (Python)? I'm using a remote site and only have access via Zope's ZMI. Can I create a script through that? --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Creating links dynamically
On Tue, May 31, 2005 at 03:08:36PM -0500, J Cameron Cooper wrote: John Poltorak wrote: Why did you put it in a File? Why not a Script (Python)? I'm using a remote site and only have access via Zope's ZMI. Can I create a script through that? Certainly. It's in the dropdown. In fact, that's why I used the silly canonical name Script (Python) rather than Python script. A... I see now Thanks for pointing that out. There are just so many options which appear from that drop down menu and I've only got used to a few of them so far. Looks like I've learned something really worthwhile today! --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] No ZMI - panic!!!!
I'm trying to update a Zope site which I set up some time ago but can't get the ZMI to start up. Any ideas on what to do? When I try to acccess http://mysite:8080/ I get - Zope Site Error. How do I force a login prompt or include a login in the URL? If this is a FAQ, please tell me which Q to look under. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )