Search

Hi, I have a problem with for-each loop. There is 4 entries.

Everything is OK, but only one image is repeating (from first entry)... Any solution?

Thanks!

Your images are not being called from the context that your loop is in...

<img src="{$workspace}/{image/@path}/{image/filename}" />

Should fix it.

XSL is context based. As you are in a loop, then the current context is the current entry node you are in. The paths you had specified would always call the first entry node in the set, as the context starts from the root.

Thanks a lot!

Problem solved :)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details