Search code examples
xpages

Remove <div> tag from DOM


I am building an XPages application based on a custom theme I bought. I want to use include pages to display custom 'widgets' in the header

Unfortunatelly, the included pages are rendered in a tag, which is incompatible with the css stylesheet from the theme.

Here's the code including the pages (the idea is to make this configurable in the future)

<xp:panel styleClass="navbar-account">
    <ul class="account-area">
            <xp:include pageName="/nav_VisitIn.xsp"></xp:include>
            <xp:include pageName="/nav_MyVisit.xsp"></xp:include>
            <xp:include pageName="/nav_Profile.xsp"></xp:include>
    </ul>
</xp:panel>

The rendered html looks something like this enter image description here

The css for the list item tags (and all elements below) are similar to

.navbar-account .account-area > li {...}

I want to avoid having to modify all related styles from the theme. Is there a way to make sure the include page is rendered without the div tag or can I remove the generated div tag (but not its content) from the DOM?


Solution

  • Try adding disableOutputTag="true" in your <xp:include> tags.