Hello and happy new year!!!
I am building a new web site with MODx.
For each resources, I create two Template variable
- One is the introduction text for the related page
- the second is for an image related to the page
Let’s say, I have 5 pages
On my home page, I would like to display 5 sections with the following HTML
<div class="row py-5" data-aos="fade-left">
<div class="col-md-4">
<figure>
<img src="img/lecture-bio.png" class="img-fluid" title="Image of the related page" alt="Image of the related page"/>
</figure>
</div>
<div class="col-md-8">
<h2>Intro</h2>
<p>
Intro text
</p>
<p>
<a href="" class="read-more">
Read more (Link to the page)
</a>
</p>
</div>
</div>
As you can see there is
data-aos="fade-left"
and the first colom has a image
My goal is to do that my first colomn has
data-aos="fade-left"
and the second
data-aos="fade-right"
the the third
data-aos="fade-left"
and the fourth
data-aos="fade-right"
and so one.
Same for the image
The first section, the image is on the first column, for the second, the image is in the second column, and so on,
How would you do that with wayfinder?
Let me provide you more information about how I setup wayfinder.
I create two Chunck
outerTplHome
[[+wf.wrapper]]
and rowTplHome
<div [[+wf.classes]] data-aos="fade-left">
<div class="col-md-4">
<figure>
[[+imagePage]]
</figure>
</div>
<div class="col-md-8">
[[+introForHomePages]]
<p>
<a href="[[+wf.link]]" class="read-more" title="[[+wf.title]]" [[+wf.attributes]]>
En savoir plus
</a>
</p>
</div>
</div>
and here is my call
[[!Wayfinder? &startId=
0 &level=
1 &rowTpl=
rowTplHome &outerTpl=
outerTplHome &outerClass=
outerClass &rowClass=
row py-5 &levelClass=
level &hideSubMenus=
0 &hereClass=
current &rowIdPrefix=
1]]
My idea is to generate an incremental id on the row level.
and in my column level
<div [[+wf.classes]] data-aos="fade-left">
In that way, I could use the if plugin. The idea, if I can find a way the get a pair or impair number, I could print data-aos="fade-left"
or data-aos="fade-right"
same for the column, I can build columns in consequence of the pair or impair number
Any idea about the best way to get my goal with a wayfinder parameter??
Note: I saw rowIdPrefix=1
but that do nothing
Many thanks