diazo

Add class to body tag using diazo with notheme

余生长醉 提交于 2020-01-14 14:59:11
问题 i'm displaying the content of a document in an overlay using plone/document?ajax_load=True&ajax_include_head=True as the src for an iframe. in development mode appending &diazo.off=1 did the trick. on the production server this sadly does not work, so i added the ajax_load parameter as suggested in the documentation of plone.app.theming i wrapped all my directives in a <rules if-not="$ajax_load"> element to make sure they are not applied (see code below) now i'd need to mark the body of the

How can I preserve HTML entities with Diazo?

人走茶凉 提交于 2020-01-06 06:49:07
问题 I have the following simple Diazo rules file: <rules xmlns="http://namespaces.plone.org/diazo" xmlns:css="http://namespaces.plone.org/diazo/css" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <theme href="theme/theme.html" /> <replace css:theme-children="#content" css:content-children=".content" /> </rules> and theme: <html> <body> <div id="content"> Lorem ipsum ... </div> </body> </html> The source I want to transform is: <html> <body> <div class="content"> <a href="mailto:info@example

Plone - XSLTApplyError: xsltValueOf: text copy failed

陌路散爱 提交于 2019-12-24 05:34:31
问题 I have a Plone 4 with plone.app.theming(Diazo) installed and I am having problem when I am using a zip file theme through Diazo Control Panel. I had tried for many times to identify the cause of the error showed in the Plone log bellow: 2011-07-10 20:20:55 ERROR plone.transformchain Unexpected error whilst trying to apply transform chain Traceback (most recent call last): File "/opt/Plone4/buildout-cache/eggs/plone.transformchain-1.0-py2.6.egg/plone/transformchain/transformer.py", line 42, in

Plone 4.2 - how can I change the logo in a diazo theme?

风流意气都作罢 提交于 2019-12-22 15:26:22
问题 I have just installed a theme in Plone called beyondskins.responsive. Now I want to change the logo so that it uses the logo for my site and not the default Plone logo. I've spent an hour googling this problem and I have not found a solution. One of the places I looked was here: http://pypi.python.org/pypi/plone.app.theming#modifying-the-theme This site tells me "You can modify a theme by clicking Modify theme underneath a theme in the Themes tab of the Theming control panel." However, I don

Plone 4.2 - how can I change the logo in a diazo theme?

蹲街弑〆低调 提交于 2019-12-22 15:25:10
问题 I have just installed a theme in Plone called beyondskins.responsive. Now I want to change the logo so that it uses the logo for my site and not the default Plone logo. I've spent an hour googling this problem and I have not found a solution. One of the places I looked was here: http://pypi.python.org/pypi/plone.app.theming#modifying-the-theme This site tells me "You can modify a theme by clicking Modify theme underneath a theme in the Themes tab of the Theming control panel." However, I don

How to link an URL inside the them from the Diazo rules file?

大兔子大兔子 提交于 2019-12-13 02:15:39
问题 If an URL to a image is set in a HTML template, then the URL is updated to reference files inside the theme folder. For example, <img src="image.png" /> is replaced by: <img src="http://localhost:8080/mysite/++theme++mytheme-theme/image.png" /> However, if I write following Diazo rule: <replace css:content="#some-class"> <div id="#some-class"><img src="image.png" /></div> </replace> the URL of the image is not update. How can I write Diazo rules where the image gets correctly referred. I want

How to use diazo and editskiswitcher together

好久不见. 提交于 2019-12-12 04:58:06
问题 I want to use a diazo theme based on no theme(!). i.e. no sunburst, not classical plone. And at the same time to use e.g. Sunburst for admin purposes. Maybe via editskiswitcher. Is it possible? It seems that diazo uses the base theme both for the active theme and for the unthemed hostnames. 回答1: Assuming your Plone Site is in 192.168.45.131 and you have following entry in your hosts file: 192.168.45.131 192.168.45.131-unthemed Create a Plone Site (e.g. "Plone") http://192.168.45.131:8080

remove spaces and carriage returns from Plone content with Diazo(minimizing html code)

点点圈 提交于 2019-12-11 03:53:39
问题 I have a Plone site, themed with plone.app.theming. how diazo minimizing html content? and remove spaces and carriage returns Content: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="content"> <p>Not empty paragraph text</p> <p><span>Not empty paragraph element</span> </div> </body> </html> Output: <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head><body><div id="content"><p>Not empty paragraph

New theme product gives “ValueError: Theme my.theme is not available”

怎甘沉沦 提交于 2019-12-10 22:09:05
问题 I have created a new theme via zopeskel using these instructions http://docs.plone.org/adapt-and-extend/theming/theme_product_with_diazo.html However trying to install the product, I get the error: Module plone.app.theming.exportimport.handler, line 38, in importTheme ValueError: Theme hccrems.theme is not available I'm not sure what my theme is missing as I have followed through the doc twice. src/hccrems.theme/hccrems/theme/configure.zcml http://pastie.org/9142461 src/hccrems.theme/hccrems

Diazo - Conditionally add a class to a theme element

萝らか妹 提交于 2019-12-10 10:20:25
问题 I need to add a class to an element coming from the theme only if certain conditions are met. I've tried this solution, adjusted for Diazo by replacing prepend with before : <before css:theme=".main" if-content="not(//*[@id='portal-column-two'])"><xsl:attribute name="class"><xsl:value-of select="//*[@class='main']/@class"/> full</xsl:attribute></before> but I get the following error: XSLTApplyError: xsl:attribute: Cannot add attributes to an element if children have been already added to the