Breaking down the Xpath select statement a little more (removing the quote escapes):<!-- in master.html -->
<div id="centercontent">
<div id="status_block" py:if="tg_flash"
class="flash" py:content="tg_flash">
</div>
<div
py:replace=
"select('//div[@id=\'centercontent\']/*|text()')">
</div>
<div id="rightcontent">
<div
py:replace=
"select('//div[@id=\'rightcontent\']/*')">
</div>
<!-- in welcome.html -->
<div id="centercontent">
<!-- all your base here -->
</div>
<div id="rightcontent">
<!-- navigation stuff here -->
</div>
//div[@id='centercontent']/*//div == in all 'div' elements
[@id='centercontent'] == where the (@) attribute 'id' is equal to 'centercontent'
/* == select all the children elements
1 comment:
Excellent post. Answers a ton of questions.
Post a Comment