I am new to Modx and working on a site that has images for menus. How do i link the pages to these images? I cannot find the IDs or a physical path to the pages I create.
-
☆ A M B ☆
- 24,524 Posts
Use imgage-type TVs for the image. Then use the TV's placeholder tags in your Wayfinder tpl. For example, if you named the image TV "menuImage" the rowTpl might look like this:
<li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+menuImage]]<span class="moveit">[[+wf.linktext]]</span></a>[[+wf.wrapper]]</li>
Use CSS to move the linktext in the "moveit" span out of the viewing area.
span.moveit{margin-left:-9000px;}
Some CSS alternatives:
http://www.sitepoint.com/new-css-image-replacement-technique/
http://stackoverflow.com/questions/471510/hide-text-using-css
Thank you, but as I stated I am new to MODX, thus your response was like reading arabic lol. Please Explain the +wf.id tags. I am not even sure where those tags are or if they are in another package.