Project | WXT | Basics | Download | Documentation | Samples

removeparent

When a PI produce no content it may be usefull to remove the surrounding element.

Optional parameter for all PIs

removeparent If the PI produce no content and you have specified removeparent as yes, the PI's parentnode will be removed and replaced by a comment-node telling it has been removed. no is default.

Examples:

<div class="content">
    <div class="headersection">
    [<?_wxt moduletoc  cols="0" tags=",h2" divider=" ][ "?>]
    </div>
    ....
  <div>

may produce:

<div class="content">
	  <div class="headersection">
	  [<!-- empty -->]
	  </div>

	  ....
<div>

or with removeparent set to yes

<div class="content">
	  <!-- empty parentremoved -->
	  ....
<div>

You can also use removegrandparent