Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8297091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:16:28+00:00 2026-06-08T15:16:28+00:00

i’m displaying the content of a document in an overlay using plone/document?ajax_load=True&ajax_include_head=True as the

  • 0

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 iframed page with a certain class to apply different styles (eg no background color for the body in overlays)

the solution proposed for a nearly similar question does only work if you are using a theme with a body element having a class attribute to operate on.

is there a way to add a class to the content without having a theme (using )?
or do i have to supply an empty html document (index2.html) as theme and apply lots of rules to copy over css/js etc twice?

<rules if="$ajax_load">

    <!-- theme href="index.html" /-->

    <notheme />


    <!-- only works when using a theme -->
    <before theme-children="/html/body"><xsl:attribute name="class"><xsl:value-of select="/html/body/@class"/> my class</xsl:attribute></before>


    <!-- thought this could to the trick but does not work at all -->
    <xsl:template match="html/body">
    <xsl:attribute name="class"> foo</xsl:attribute>
    </xsl:template>


</rules>

<rules if-not="$ajax_load">


    <theme href="index.html" />

    <replace content="/html/head/title" theme="/html/head/title" />
    ...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:16:30+00:00Added an answer on June 8, 2026 at 3:16 pm

    Obviously without a theme to operate on, any rule referencing a theme does not work in conjunction with <notheme/>. You can however <drop> and <replace> content (I have ideas of how to implement <before> and <after> content, but its difficult to implement. Maybe in a future version of Diazo.) However you can achieve the same thing with a small amount of xslt:

    <replace content="/html/body/@class">
        <xsl:attribute name="class"><xsl:value-of select="."/> newclass</xsl:attribute>
    </replace>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have thousands of HTML files to process using Groovy/Java and I need to
I am using Paperclip to handle profile photo uploads in my app. They upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.