TechQA.

How to transfer changed content into plone theme with diazo?

256 views Asked by jurihandl At 2013-12-05T07:54:14+00:00 05 December 2013 at 07:54 2025-12-21T19:37:25+00:00

Now I need the following search structure in the theme:

<div class="sideCol">
    <aside class="siteSearch">
        <form name="searchform" action="search" class="searchPage searchform" id="searchform">
            <fieldset>
                <legend>Website durchsuchen</legend>
                <input class="searchPage text lang-de" name="SearchableText" type="text" size="25" title="Website durchsuchen" value="" placeholder="Suchbegriff..." />
                <button type="submit"><i class="icon-search"></i></button>
            </fieldset>
        </form> 
    </aside>            
</div>

All I need to get from Plones sunburst theme is the action link for the form element. So I tried this:

<replace css:content-children="#portal-searchbox">
    <xsl:variable name="action_link" select="form/@action" />
    <form name="searchform" action="search" class="searchPage searchform" id="searchform">
        <xsl:attribute name="action">${action_link}</xsl:attribute>
        <fieldset>
            <legend>Website durchsuchen</legend>
            <input class="searchPage text lang-de" name="SearchableText" type="text" size="25" title="Website durchsuchen" value="" placeholder="Suchbegriff..." />
            <button type="submit"><i class="icon-search"></i></button>
        </fieldset>
    </form>
</replace>
<replace css:content-children="#portal-searchbox" css:theme-children=".siteSearch" />

The problem ist that all I get in the theme is the structure of Plones Sunburst Search.

<div class="sideCol">
    <aside class="siteSearch">
        <form id="livesearch0" action="http://localhost:8080/mamuz/de/@@search">
            <div class="LSBox">
                <label class="hiddenStructure" for="searchGadget">Website durchsuchen</label>
                <input name="SearchableText" type="text" size="18" title="Website durchsuchen" placeholder="Website durchsuchen" accesskey="4" class="searchField" id="searchGadget" autocomplete="off">
                <input class="searchButton" type="submit" value="Suche">
                <div class="searchSection">
                    <input id="searchbox_currentfolder_only" class="noborder" type="checkbox" name="path" value="/mamuz/de/impressum">
                    <label for="searchbox_currentfolder_only" style="cursor: pointer">nur im aktuellen Bereich</label>
                </div>
                <div class="LSResult" id="LSResult">
                    <div class="LSShadow" id="LSShadow"></div>
                </div>
            </div>
        </form>
        <div id="portal-advanced-search" class="hiddenStructure">
            <a href="http://localhost:8080/mamuz/de/@@search" accesskey="5">Erweiterte Suche…</a>
        </div>
    </aside>
</div>

I'm familiar with diazo but pretty new to xslt. What is wrong? I tired several types of placements like import before it gets modified. Nothing helps.

xslt plone diazo xdv
Original Q&A
1

There are 1 answers

1
ebrehault ebrehault On 2013-12-05T12:39:56+00:00 05 December 2013 at 12:39

Using the replace directive on attribute itself should work:

<replace attributes="action"
    css:content="#portal-searchbox form"
    css:theme="#searchform" />

Related Questions in XSLT

  • Sorting items after building an XML feed?
  • link href to website css does not work since upgrading to Windows Server 2019
  • Chaining templates in XSLT 2.0
  • XPath - how to exclude text from child node
  • Reuse XSLT for different XML inputs using parameters in nodeJS with saxon-js
  • How to iterate XSL and get nodes
  • XSLT to tun flat xml structure into hierarchical
  • transform '?oxy_comments' into xml tag
  • xslt transform hierarchy into new hierarchy
  • Convert element tags to key value pair in OIC map
  • Converting characters in XML text node to subscript or superscript with XSLT
  • Saxon HE 12.4 Fails to provide the error location in ErrorReporter
  • how can I use net.sf.saxon.s9api.XsltTransformer in multiple threads to avoid impacting perfromance and throughput?
  • Issue with XSL Display since Chrome 123 Update
  • 'XML External Entity Injection' issue isn't resolving even after fortify recommended suggestion

Related Questions in PLONE

  • Remove all jobs from plone.app.async queue
  • How to add view access to members in plone
  • Plone Error After Migration: KeyError('language',)
  • Exporting data from a .fs file. Plone 3.3.5
  • How do I create a plone and volto project
  • Manually start plone 6 instance inside docker container
  • Plone 6 Volto generate app - Cannot find module 'is-ci'
  • Pressing Enter key on input field does not work as expected
  • Couldn't find index page for 'ploneconf.site' (maybe misspelled?)
  • Python Could not import class
  • Finding all views/namespace urls in a Zope3 system?
  • Is it possible to add a if condition inside tal:define?
  • Buildout - Allow hosts for package download
  • Modify or clean form input in zope or plone
  • Rename Dexterity object (id) after copy

Related Questions in DIAZO

  • how to replace nested elements with diazo Rules.xml in Plone5
  • Editing buildout.cfg in Plone from a browser
  • Diazo - on error show message (when you get the content from a page)
  • Plone collective.sendaspdf ignores diazo theme
  • Diazo rule to append element before closing tag
  • Diazo / XSLT - replace class of content in one of two places in theme
  • How to purge cached Diazo theme data for non logged in visitors in Plone5 after TTW edits
  • Works with CSS but not Diazo <drop> rule
  • How to stop Diazo from stripping whitespace in Plone?
  • Multiple Conditions in Diazo
  • How to link an URL inside the them from the Diazo rules file?
  • How to reference images in a Diazo template?
  • Paste.httpserver - serve on socket
  • Diazo XSLT and external document only work with a hardcoded path to the document
  • I want use diazo to replace a attribute, but diazo's <replace /> statement with attributes is not work?

Related Questions in XDV

  • How to transfer changed content into plone theme with diazo?
  • How can I preserve white spaces between tags with Diazo?
  • How to copy element's children to an other element's specific attribute with Diazo
  • Diazo: not style overlay windows in Plone
  • Migrating an XDV theme product to Diazo
  • Page unthemed when using overlay form
  • plone.app.theming including content from external site
  • Diazo is only for plone4?
  • How un-theme all the tinymce windows using a diazo theme
  • Best way to serve static resource (CSS, Images) with XDV in Plone
  • Problems seeing my xdv changes in Plone
  • Is it possible to remove base and Content-Type + alter HTML attributes in Diazo?
  • Adding an class to body element with XDV
  • Plone/XDV Related Item Overlay is Empty
  • How to strip out &#13; character references inserted by Diazo into text nodes

Popular Questions

  • How do I undo the most recent local commits in Git?
  • How can I remove a specific item from an array in JavaScript?
  • How do I delete a Git branch locally and remotely?
  • Find all files containing a specific text (string) on Linux?
  • How do I revert a Git repository to a previous commit?
  • How do I create an HTML button that acts like a link?
  • How do I check out a remote Git branch?
  • How do I force "git pull" to overwrite local files?
  • How do I list all files of a directory?
  • How to check whether a string contains a substring in JavaScript?
  • How do I redirect to another webpage?
  • How can I iterate over rows in a Pandas DataFrame?
  • How do I convert a String to an int in Java?
  • Does Python have a string 'contains' substring method?
  • How do I check if a string contains a specific word?

Trending Questions

  • UIImageView Frame Doesn't Reflect Constraints
  • Is it possible to use adb commands to click on a view by finding its ID?
  • How to create a new web character symbol recognizable by html/javascript?
  • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
  • Heap Gives Page Fault
  • Connect ffmpeg to Visual Studio 2008
  • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
  • How to avoid default initialization of objects in std::vector?
  • second argument of the command line arguments in a format other than char** argv or char* argv[]
  • How to improve efficiency of algorithm which generates next lexicographic permutation?
  • Navigating to the another actvity app getting crash in android
  • How to read the particular message format in android and store in sqlite database?
  • Resetting inventory status after order is cancelled
  • Efficiently compute powers of X in SSE/AVX
  • Insert into an external database using ajax and php : POST 500 (Internal Server Error)
  • Privacy
  • Terms
  • Cookies
  • Homegardensmart
  • Aftereffectstemplates
  • Jogjafile