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