Newbie question about Zope/Plone interaction
Zope Folk, Hey all. I�m pretty sure that what I�m about to ask is a pretty stupid question, but for the life of me I can�t figure it out. I�m not a programmer by trade, and am just volunteering to build a site for a small Human Rights NGO in Eastern Europe. I figured it�d be no problem since I know Dreamweaver pretty well, but they didn�t mention any dynamic needs till after I�d agreed. Sneaky bastards. ;) Anyways, I installed Plone & Zope on Monday and had a pretty easy time getting it up and running and converting some static pages I�d built into Zope Page Templates. The problem is that I�ve spent the last 3 days trying to get my ZPTs to display the content I�ve already entered into Plone and had no success. I�ve read the Plone manual, done the Zope Tutorial, and read all of the parts of the Zope manual that seem applicable, but I�m still hitting my head against a brick wall. Here are the assumptions I�ve been working under: A. The front-end users at the office can enter content through the Plone portal which in turn can be displayed by ZPTs. B. My site folder in Zope should be in a separate folder than the one that contains Plone. C. My ZPTs can access content in Plone by simple statements like �<span tal:content="Plone/latest"></span>�, �Plone� being the Plone folder in the Zope Root Folder, �latest� being the name of a news item I�ve uploaded into Plone. I�ve been told on the online chat that I should be entering �here.latest� and I�ve tried that as well, using every possible permutation of what �here� may mean (including literally �here�) with no luck. So can anyone tell me what I�m doing wrong and why I can�t access my Plone content in my ZPTs? I�m sure it�s obvious, but it�s not jumping out at me. I really only need dynamic content for 6 pages, and I�m hesitant to start creating the other 120 until I�ve got this figured out, so I�m kind of at a standstill. Anyways, if you�ve gotten this far thanks for reading. Any advice would be much appreciated. Cheers, Daniel Cruz __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Thu, Jul 08, 2004 at 07:56:42AM -0700, Daniel Cruz wrote:
Zope Folk,
Hey all. I?m pretty sure that what I?m about to ask is a pretty stupid question, but for the life of me I can?t figure it out. I?m not a programmer by trade, and am just volunteering to build a site for a small Human Rights NGO in Eastern Europe. I figured it?d be no problem since I know Dreamweaver pretty well, but they didn?t mention any dynamic needs till after I?d agreed. Sneaky bastards. ;) Anyways, I installed Plone & Zope on Monday and had a pretty easy time getting it up and running and converting some static pages I?d built into Zope Page Templates. The problem is that I?ve spent the last 3 days trying to get my ZPTs to display the content I?ve already entered into Plone and had no success. I?ve read the Plone manual, done the Zope Tutorial, and read all of the parts of the Zope manual that seem applicable, but I?m still hitting my head against a brick wall.
Here are the assumptions I?ve been working under: A. The front-end users at the office can enter content through the Plone portal which in turn can be displayed by ZPTs.
So far so good.
B. My site folder in Zope should be in a separate folder than the one that contains Plone.
This is very unusual. Can you explain your thinking here? It's more common to put your templates somewhere under portal_skins somewhere in plone itself, i.e. learn how the skin tool works.
C. My ZPTs can access content in Plone by simple statements like ?<span tal:content="Plone/latest"></span>?, ?Plone? being the Plone folder in the Zope Root Folder, ?latest? being the name of a news item I?ve uploaded into Plone. I?ve been told on the online chat that I should be entering ?here.latest? and I?ve tried that as well, using every possible permutation of what ?here? may mean (including literally ?here?) with no luck.
In ZPTs, you need to provide a namespace before you can look up a named object like your Plone site folder. The namespace can be a variable you defined previously, or more commonly it can be one of the several built-in namespaces. "here" is one such built-in namespace. It means "look up the the next name in the current folder, possibly using contextual acquisition." Try: <span tal:content="structure here/Plone/latest"></span> People probably advised you to try "here/latest" because they didn't realize you were using templates Note also the "structure" keyword - that tells ZPT to turn off html-quoting of the content. -- Paul Winkler http://www.slinkp.com
oops, i hit send mid-edit... On Thu, Jul 08, 2004 at 12:48:19PM -0400, Paul Winkler wrote: (snip)
People probably advised you to try "here/latest" because they didn't realize you were using templates ... located outside your plone site. "here/latest" looks for "latest" in the current context, and in your case it's not there.
-- Paul Winkler http://www.slinkp.com
participants (2)
-
Daniel Cruz -
Paul Winkler