Moving ordered elements and adding arbitrary text in Deliverance
Posted
by Jon Hadley
on Stack Overflow
See other posts from Stack Overflow
or by Jon Hadley
Published on 2010-05-17T15:50:14Z
Indexed on
2010/05/17
16:10 UTC
Read the original article
Hit count: 287
Using the following XPath derived rule, I am able to select a list of events from a Plone site (similar to Plone Community events) and display them in my Deliverance themed site:
<replace content="//*[@id='parent-fieldname-title' or @class='explain' or @id='parent-fieldname-location' or @id='parent-fieldname-text']" theme="#center-content-to-replace-one" />
However, two separate, but related, problems now rear their heads.
I can't work out how to:
- Re-order elements within the replaced theme, such as moving images originally held within #parent-fieldname-text to before #parent-fieldname-title
- Put arbitrary text before elements. Such as 'Page Title:' before #parent-fieldname-title
I could do both if I was just dealing with one record, as place holders(1) or text before place holders(2) could be specified in the template - but I can't see a away for that template behaviour to repeat across multiple items in one page. (if that is indeed the solution)
Is this a job for pyQuery?
© Stack Overflow or respective owner