[Zope-DB] showing mysql results in plone
bobb
rawsystems at gmail.com
Tue Mar 15 12:25:37 EST 2005
I think your <body> tag should be after the <div metal: "Main"> line...
as
<body tal:define="results " bla bla bla...
(at least that)
Sent you an email off-list...
hth
bobb
----- Original Message -----
From: Lawrence Milliken
To: zope-db at zope.org
Sent: Tuesday, March 15, 2005 12:09 PM
Subject: [Zope-DB] showing mysql results in plone
Sorry for the cross-post, I'm not getting any help from Plone-Users and I'm really stuck.
hi all,
I have a zpt for a zsql query that, when I view it, looks like a plone document, I'm trying to figure out how to either add it to a folder on my plone site or paste it into a plone document so that the query results are displayed.
The code for the zpt (in portal_skins/custom) is:
<code>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en"
metal:use-macro="here/main_template/macros/master"
i18n:domain="plone">
<body>
<div metal:fill-slot="main">
<span tal:define="results here/databases_alpha_mysql;
start request/start|python:0;
batch python:modules['ZTUtils'].Batch(results,
size=20,
start=start);
previous python:batch.previous;
next python:batch.next">
<h1>Online Databases at the Neumann College Library</h1>
<h4>Alphabetical by Database Name | <a href="db_subject_html" name="db subject list">Databases by Subject</h4>
<p>
<a tal:condition="previous"
tal:attributes="href string:${request/URL0}?start:int=${previous/first}"
href="previous_url">previous <span tal:replace="previous/length">20</span> results</a>
<a tal:condition="next"
tal:attributes="href string:${request/URL0}?start:int=${next/first}"
href="next_url">next <span tal:replace="next/length">20</span> results</a>
</p>
<div tal:repeat="result batch" >
<dl>
<dt><a href="#" tal:attributes="href result/db_url;
title result/db_name"><span tal:replace="result/db_name">db_name goes here</span></a></dt>
<dd><span tal:replace="result/db_description">db_description goes here</span></dd>
</dl>
<br />
</div>
</code>
I've tried pasting that into the body of a new document but the results don't replace the placeholders. When I view the page I get:
Online Databases at the Neumann College Library
Alphabetical by Database Name | Databases by Subject
previous 20 results next 20 results
db_name goes here
db_description goes here
previous 20 results next 20 results
Any help will be appreciated.
Larry Milliken
Reference Librarian
Neumann College Library
Larry Milliken
Reference Librarian
Neumann College Library
------------------------------------------------------------------------------
_______________________________________________
Zope-DB mailing list
Zope-DB at zope.org
http://mail.zope.org/mailman/listinfo/zope-db
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-db/attachments/20050315/d3cfa60e/attachment.htm
More information about the Zope-DB
mailing list