Anyone out there who can give me the decisive answer to this question? I got all the other links (except the top link with the image) dynamically working. I have not yet found a way how to address the image (a-Class) via wayfinder.
<div id="menu">
<ul>
<li><a href="#top" class="logo"><img src="images/logo-min.png" alt="" /></a></li>
<li><a href="#about">About</a></li>
<li><a href="#portfolio">Arbeiten</a></li>
<li><a href="#blog">Chronik</a></li>
<li><a href="#features">Kompetenzen</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
Any hints will be appreciated greatly. Thanks.
-
☆ A M B ☆
- 24,524 Posts
You could set a classname for the first item (&firstClass=`first`), then have it as a background image in the CSS.
ul li.first {background: url(../images/logo-min.png);}
Many thanks Susan for your quick reaction to my posting. I testet what you suggested. The image appears now behind the <Home> link (MODx dynamic link 1) but not where the top link should be. There must be a confusion between the <Home> List-Item and the firstClass item: #top.
-
☆ A M B ☆
- 24,524 Posts
Is the "top" resource the parent of the rest of the resources?
-
☆ A M B ☆
- 24,524 Posts
That's a matter of Javascript; the container with the menu in it would be dynamically positioned and re-styled as the screen scrolls. The menu itself is still just a plain old Wayfinder unordered list.
If you look at a "view source" of the page, you can see the javascript code at the top.
You can generate a partially static, partially dynamic menu with some fancy footwork with the outerTpl and the other tpls, putting the beginning tag and the first set of li tags in the outerTpl, with the wf.wrapper placeholder and the closing ul tag following. Then Wayfinder would generate the rest of the menu.
[SOLVED!] Got it! This cracked the nut. I am very grateful for the assistance. I had already tried to mix static and dynamic elements in the template. Obviously I missed to get the tag orders right or chose the wrong template. Now I go on enjoying the smart MODx framework even more. Kind regards from Switzerland. Thomas.