Results 1 to 7 of 7

Thread: Filter from different Catalog / Multilanguage

  1. #1
    User
    Join Date
    07-13-09.
    Posts
    83

    Default Filter from different Catalog / Multilanguage

    Okay, I´m not sure if there´s a solution for this problem, but I´ll be posting it in hope I´m wrong.

    I have a Catalog for an Architect in which he can add his projects. Everything should be multi-language.
    In this Catalog (Projects) he can choose between Materials (Wood, Glass, Steel,...).
    I have created a second Catalog (Materials) with only two fields:
    Field 1: Material German
    Field 2: Material English

    In this Catalog (Materials) he can easily create as many Materials as he wants. These Materials can later be choosen in his Main Catalog (Projects) via a Field [tags].

    In the frontend I made a filter module in which you can filter all displayed Projects by Material. The Filter shows german materials only (Glas, Metall, Holz). That´s all good.
    But how can I make a Filter that shows the english Materials (glass, metall, wood)? Do I need to make the Architekt choose the Materials twice in the Catalog? Once in German, once in English?
    That would be quite a messy thing to do?

    I´m curious if there´s a solution.
    Best,
    Valentin

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Filter from different Catalog / Multilanguage

    You've done a nice job of figuring it out, but the main problem exists that the filter can only map to 1 field. I would also investigate the Filter Widget options (in code), but I think it will only show the single mapped value.

    If TL was properly language-encoded, all fields could have multiple text areas and language would be auto-detected and completed based on that.

    Another way would have been to use the Taxonomy to create materials. Create two roots:

    Code:
    Materials
       - English
          - Glass
          - Wood
          - Metal
       - German
          - Glas
          - Metall
          - Holz
    Then in your main Catalog specify Two fields to be tagged. Then the guy (unfortunately) has to remember to tick the german AND English tags the same.

    Then you can create a page where the filter, does its filtering on the English tags and another (on the German page) where it filters on the German tags.

  3. #3
    User
    Join Date
    07-13-09.
    Posts
    83

    Default Re: Filter from different Catalog / Multilanguage

    okay, so it seems that in any case the guy has to choose both languages when entering his projects...
    just wanted to make sure that there relly is no other way.

    btw. i prefer to make another catalog for the materials (instead of using the taxonomy) since it´s easier to handle for clients...

    thanks,
    v

  4. #4
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Filter from different Catalog / Multilanguage

    You can then still use 1 catalog for the languages (like you have done then), but create two tags "filter" fields, each only mapping 1 variable (english or german) to the tags list, (1) map the english field and (2) the german field.

  5. #5
    New user
    Join Date
    10-30-09.
    Location
    Padova - ITALY
    Posts
    8

    Default Re: Filter from different Catalog / Multilanguage

    Hi, i'm maurizio and i'm italian typolight user. I'm building a website with a multilanguage catalog and i have chosen the same valentin's method. But I have a problem because i have 2 root (IT - EN) and the reading pages of catalog is in italian root. The is a possibility to specify 2 reading page for the same catalog. Any suggestion ? Thank you.

    Maurizio

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Filter from different Catalog / Multilanguage

    each list module has the ability to specify a redirect page when it redirects the link. You can therefore make a italian list redirecting to an italian reader page, and also the same for english.

  7. #7
    New user
    Join Date
    10-30-09.
    Location
    Padova - ITALY
    Posts
    8

    Default Re: Filter from different Catalog / Multilanguage

    Hi, i create two template for my site. I use FOLDER_URL e CHANGELANGUAGE module and I assign for every page the prefix of the language:

    it
    - it/reader
    - it/list
    en
    - en/reader
    - en/list

    and the template for LIST is
    Code:
    <?php if (count($this->entries)): ?>
     
    <div class="layout_simple">
     
    <?php foreach ($this->entries as $entry): ?>
    <div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
     
    <div class="immagine">"><?php echo $entry['data']['immagine']['value']; ?></div>
    <div class="codice"><?php echo $entry['data']['codice']['value']; ?></div>
    <div class="nome"><?php echo $entry['data']['nome_'.$GLOBALS['TL_LANGUAGE']]['value']; ?></div>
    <div class="descbreve"><?php echo $entry['data']['descrizione_'.$GLOBALS['TL_LANGUAGE']]['value']; ?></div>
     
    <?php if ($entry['url']): ?>
    <div class="link">">{?{iflng::it}}Vai alla scheda...{?{iflng}}{?{iflng::en}}View Product...{?{iflng}}</div>
    <?php endif; ?>
    </div>
     
    <?php endforeach; ?>
    </div>
     
    <?php else: ?>
     
    <?php if ($this->condition): ?>
    <div class="condition"><?php echo $this->condition; ?></div>
    <?php else: ?>
    <p class="info">There are no entries matching your search.</p>
    <?php endif; ?>
     
    <?php endif; ?>
    and the template for the READER is
    Code:
    <?php if (count($this->entries)): ?>
     
    <div class="layout_full">
     
    <?php foreach ($this->entries as $entry): ?>
    <div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
     
    <div class="immagine"><?php echo $entry['data']['immagine']['value']; ?></div>
    <div class="codice"><?php echo $entry['data']['codice']['value']; ?></div>
    <div class="nome"><?php echo $entry['data']['nome_'.$GLOBALS['TL_LANGUAGE']]['value']; ?></div>
    <div class="descbreve"><?php echo $entry['data']['descrizione_'.$GLOBALS['TL_LANGUAGE']]['value']; ?></div>
     
    <div class="desclunga">
    <div class="label">{?{iflng::it}}Descrizione{?{iflng}}{?{iflng::en}}Description{?{iflng}}</div>
    <?php echo $entry['data']['descrizionelunga_'.$GLOBALS['TL_LANGUAGE']]['value']; ?></div>
     
     
    <?php if ($entry['data']['allegato']['value']): ?>
    <div class="allegati">
    <div class="label">{?{iflng::it}}File allegati{?{iflng}}{?{iflng::en}}Attached File{?{iflng}}</div>
    <?php echo $entry['data']['allegato']['value']; ?></div>
    <?php endif; ?>
     
    </div>
    <?php endforeach; ?>
    </div>
     
    <?php else: ?>
    <p class="info">Invalid item reference for catalog.</p>
    <?php endif; ?>
    Now my site work with one template and one module for every language.

    Hi.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •