Moving ordered elements and adding arbitrary text in Deliverance
- by Jon Hadley
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?