How to refer to body class?
Hello!
I have a template which makes me two links. I'm using changelanguage so I want to translate these also. My idea is to put the whole <ul>[/list]in an IF statement, but i don't know how to give the condition because i don't know how to refer to the body tag's class name.
Could anyone help me?
Code:
<div class="<?php echo $this->class; ?> pagination block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<ul>
<?php if ($this->previous): ?>[*]previous['title']; ?>">vissza
<?php endif; ?>
<?php if ($this->next): ?>[*]next['title']; ?>">tovább
<?php endif; ?>[/list]
</div>
Re: How to refer to body class?
this is the wrong way to do translations.
take a look at http://www.contao.org/en/custom-conf...l#translations
Re: How to refer to body class?
You don't need to refer to the <body> class. Use the {{iflng::*}} insert tag instead.
For example:
Code:
{{iflng::hu}}vissza{{iflng}}{{iflng::en}}back{{iflng}}{{iflng::de}}Zurück{{iflng}}
As already mentioned by ga.n you can also use a language variable:
Code:
<?php echo $GLOBALS['TL_LANG']['MSC']['previous']; ?>
or
Code:
<?php echo $GLOBALS['TL_LANG']['MSC']['goBack']; ?>