Add feature

This commit is contained in:
2025-08-18 14:15:23 +02:00
parent f6eb9527d8
commit 0f8e943f2d
3 changed files with 43 additions and 21 deletions

View File

@@ -1,29 +1,23 @@
# README # # Components Wrapper #
This README would normally document whatever steps are necessary to get your application up and running. Use this approach when you need to start a wrapper element in one component, and close it in another one.
### What is this repository for? ### ### How to use ###
* Quick summary 1. Copy and paste example code from first-component.xslt
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
### How do I get set up? ### ```
<iaixsl:if test="count(commercial_banner/link) > 0 and count(commercial_button2/link) > 0">
<iaixsl:text disable-output-escaping="yes">&lt;div id="commercial_section_wrapper" iai:class="mb-4|commercial_section_bottom_space" &gt;
</iaixsl:text>
</iaixsl:if>
```
* Summary of set up 2. Rewrite condition, and data inside
* Configuration 3. Do the same with second "closing" component
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions
### Contribution guidelines ### The example was given with buttons2 zone, but you can use this approach with any task that you have.
* Writing tests ---
* Code review
* Other guidelines
### Who do I talk to? ### Created by • **[IdoMods](https://idomods.pl/)** • 2025
* Repo owner or admin
* Other community or team contact

15
first-component.xslt Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<iai:component>
<iai:componentsdata>
<cdata-start/>
<!--Opening wrapper-->
<iaixsl:if test="count(commercial_banner/link) > 0 and count(commercial_button2/link) > 0">
<iaixsl:text disable-output-escaping="yes">&lt;div id="commercial_section_wrapper"
iai:class="mb-4|commercial_section_bottom_space" &gt;
</iaixsl:text>
</iaixsl:if>
<!--Data-->
<div>Something inside first component</div>
<cdata-end/>
</iai:componentsdata>
</iai:component>

13
second-component.xslt Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<iai:component>
<iai:componentsdata>
<cdata-start/>
<!--Closing wrapper-->
<iaixsl:if test="count(commercial_banner/link) > 0 and count(commercial_button2/link)">
<iaixsl:text disable-output-escaping="yes">&lt;/div&gt;</iaixsl:text>
</iaixsl:if>
<!--Data-->
<div>Something inside second component</div>
<cdata-end/>
</iai:componentsdata>
</iai:component>