xdv

collective.xdv and multiple theme files

Deadly 提交于 2019-12-10 06:56:28
问题 I am having different theme HTML files for different site sections. There are some major layout differences depending if the page is the front page, or a certain subsection. As far as I see the default behavior is just to have one HTML file: http://pypi.python.org/pypi/collective.xdv#usage What would be the best strategy to use multiple theme files, slight rule variations and collective.xdv? Plone 4.1b. 回答1: We usually just utilize plain xdv and use the rules.xml (or whatever you want to call

local-name() support in Collective.xdv

China☆狼群 提交于 2019-12-07 11:54:05
问题 I have a Plone 3.5 site and I am trying to embedded Simple Social's FB Like action for a content in a collective.xdv theme. The FB Like function is embedded in an XML tag <fb:like></fb:like> I am trying to select its XPATH via //*[local-name()="like"] However, I do not see any output. Is the above supported in collective.xdv? Is there another way to select the fb:like tag in XPATH? 回答1: The libxml2 HTMLParser used by lxml and thus xdv/diazo strips namespace prefixes, so you should be able to

local-name() support in Collective.xdv

ぃ、小莉子 提交于 2019-12-05 19:36:51
I have a Plone 3.5 site and I am trying to embedded Simple Social's FB Like action for a content in a collective.xdv theme. The FB Like function is embedded in an XML tag <fb:like></fb:like> I am trying to select its XPATH via //*[local-name()="like"] However, I do not see any output. Is the above supported in collective.xdv? Is there another way to select the fb:like tag in XPATH? The libxml2 HTMLParser used by lxml and thus xdv/diazo strips namespace prefixes, so you should be able to select it with "//like". You will need to add some xslt code to fix up those tags, as they must be rendered

collective.xdv and multiple theme files

若如初见. 提交于 2019-12-05 15:12:07
I am having different theme HTML files for different site sections. There are some major layout differences depending if the page is the front page, or a certain subsection. As far as I see the default behavior is just to have one HTML file: http://pypi.python.org/pypi/collective.xdv#usage What would be the best strategy to use multiple theme files, slight rule variations and collective.xdv? Plone 4.1b. We usually just utilize plain xdv and use the rules.xml (or whatever you want to call it) file to setup the theme templates leaving the corresponding properties in the collective.xdv

How to transform block of content from plone being inserted into diazo theme

非 Y 不嫁゛ 提交于 2019-12-01 09:13:12
I'm using a diazo (currently plone.app.theming 1.0b1-r48205) with Plone 4.1. I want to use exactly Plone's html for the search widget except that I'd like to replace <input> element used for the search button in the search widget with a <button> . The diazo docs seem to suggest you can do this. In my theme html file I have an empty <div id="portal-searchbox"></div> . In my rules.xml I have the following: <rules if-content="$enabled"> <replace css:theme="div#portal-searchbox"> <xsl:apply-templates css:select="div#portal-searchbox" /> </replace> <xsl:template css:match="div#portal-searchbox

Adding an class to body element with XDV

六眼飞鱼酱① 提交于 2019-12-01 06:51:52
问题 I want to style some forms in Plone3+collective.xdv but I don't want all forms to get the special style. So I'd like to add a special styled-form class name to the class attribute of the body element just when displaying certain templates: contact-info sendto_form PFG forms So I thought that I could manage to perform this with XDV in order not to modify those templates. By using the if-content directives in XDV rules I can check if those templates are being displayed: css:if-content="body

Set HTML5 doctype with XSLT

99封情书 提交于 2019-11-26 03:37:15
问题 How would I cleanly set the doctype of a file to HTML5 <!DOCTYPE html> via XSLT (in this case with collective.xdv) The following, which is the best my Google foo has been able to find: <xsl:output method=\"html\" doctype-public=\"XSLT-compat\" omit-xml-declaration=\"yes\" encoding=\"UTF-8\" indent=\"yes\" /> produces: <!DOCTYPE html PUBLIC \"XSLT-compat\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> 回答1: I think this is currently only supported by writing the doctype out as