Search

Hello,

I'm trying to make a simple site with a list of products that are organized by categories.

In my 'products' section I have a field which references my 'category' section. In my 'category' section I have two fields 'Description English' and 'Description French'.

The urls on my site are prefaced by '/en/' or '/fr/', so no problem there detecting whether I'm in English mode or French mode.

However when I want to access the page where I list all the products grouped by the Category, I want to either display the English Description or the French Description of the category depending on whether the site is in English or French mode.

The problem is that the 'category' field in my products section can only select one field. So I either only have the English Description or the French Description.

I can't seem to figure out a simple way of getting access to the other fields in the category section while using the datasource for the section 'products'.

This must be a common problem, any suggestions ?

First, in the data source that outputs your products add an output parameter with the category (it should be $ds-products.category or something similar). After that create a data source for categories filtering by this parameter that outputs all fields you need. Then you can use xslt to test which field's content to display, based on the language. You should be using the Select Box Link field for this.

Thanks, I tried that, but the solution was still not satisfactory.

In the end I managed to what I needed with the Extension "Subsection Manager"

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