change active breadcrumb items name

26. December 2015

0 Kommentare

using title(Titel) and not pageTitle (Seitentitel)
->templates->new template for “mod_breadcrumb.html5”

// $item[data][title] instead of $item[titel]

7 <?php if ($item&#91;'isActive'&#93;): ?>
8        <li class="active<?php if ($item&#91;'class'&#93;): ?> <?= $item&#91;'class'&#93; ?><?php endif; ?> last"><?= $item&#91;'data'&#93;&#91;'title'&#93; ?></li>
9      <?php else: ?>
  

¬ geschrieben von 7masod7 in contao

Own language labels for Contao frontend

26. December 2015

0 Kommentare

in /system/config/langconfig.php


// Put your custom configuration here
$GLOBALS['TL_LANG']['MSC']['more'] = 'Mehr';

if ($GLOBALS['TL_LANGUAGE'] == 'en') {
   $GLOBALS['TL_LANG']['MSC']['more'] = 'More';
}
  

¬ geschrieben von 7masod7 in contao

Insert custom Javascript from external file

11. August 2014

0 Kommentare

<script type="text/javascript" src="{{env::files_url}}files/template/js/main.js"></script>

¬ geschrieben von 7masod7 in contao

forms must have REQUEST_TOKEN

1. April 2013

0 Kommentare

Frontend-Modul

<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">

Backend-Modul

<input type="hidden" name="REQUEST_TOKEN" value="<?php echo REQUEST_TOKEN; ?>">

¬ geschrieben von 7masod7 in contao

use contao validator

1. April 2013

0 Kommentare

$booleanVar = Validator::isEmail('email');
$booleanVar = Validator::isURL('url');

http://www.contao-docs.org/docs/Contao/html/_validator_8php_source.html

¬ geschrieben von 7masod7 in contao

get $_GET and $_POST variable

1. April 2013

0 Kommentare

$variable = Input::get('variable');
$variable = Input::post('variable');

¬ geschrieben von 7masod7 in contao

contao database

1. April 2013

0 Kommentare

uncached database query

$entries = $this->Database->query("SELECT * FROM table WHERE id=$id");
while ($entries->next()) {
 $entry = $entries->row(); 
}

cached database query with prepare statement

$entries = $this->Database->prepare("SELECT * FROM table WHERE email=?")
			  ->execute($email);
if($entries->numRows) {
	while ($entries->next()) {
                 $entry = $entries->row();
        }
}

¬ geschrieben von 7masod7 in contao

get PageId in template

20. March 2013

0 Kommentare


global $objPage; 
$intId = $objPage->id; 
if($intId != 77) : ?>
<a href="{{link_url::77}}" class="button">Get it now!</a>
<?php endif; ?>
	

or with page_id with insertags


if ('{{env::page_id}}' == '2') { 
 echo "ID is 2"; 
}
  

¬ geschrieben von 7masod7 in contao

Theme von BenediktRB • Powered by Wordpress • Abonniere den RSS Feed