Add feature
This commit is contained in:
36
README.md
36
README.md
@@ -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"><div id="commercial_section_wrapper" iai:class="mb-4|commercial_section_bottom_space" >
|
||||||
|
</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
15
first-component.xslt
Normal 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"><div id="commercial_section_wrapper"
|
||||||
|
iai:class="mb-4|commercial_section_bottom_space" >
|
||||||
|
</iaixsl:text>
|
||||||
|
</iaixsl:if>
|
||||||
|
<!--Data-->
|
||||||
|
<div>Something inside first component</div>
|
||||||
|
<cdata-end/>
|
||||||
|
</iai:componentsdata>
|
||||||
|
</iai:component>
|
||||||
13
second-component.xslt
Normal file
13
second-component.xslt
Normal 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"></div></iaixsl:text>
|
||||||
|
</iaixsl:if>
|
||||||
|
<!--Data-->
|
||||||
|
<div>Something inside second component</div>
|
||||||
|
<cdata-end/>
|
||||||
|
</iai:componentsdata>
|
||||||
|
</iai:component>
|
||||||
Reference in New Issue
Block a user