Theme und Theming: Unterschied zwischen den Versionen
Erscheinungsbild
Keine Bearbeitungszusammenfassung |
|||
| Zeile 69: | Zeile 69: | ||
==Datum / Date Feld== | ==Datum / Date Feld== | ||
<syntaxhighlight lang="html4strict" line start="1" highlight="5" enclose="div"> | <syntaxhighlight lang="html4strict" line start="1" highlight="5" enclose="div"> | ||
<?php | <?php | ||
if (function_exists('locale_language_url_rewrite_url')) { | if (function_exists('locale_language_url_rewrite_url')) { | ||
| Zeile 84: | Zeile 83: | ||
<?php $datum_bis = date(" H:i", strtotime($node->field_datum['und'][0]['value2']));?> | <?php $datum_bis = date(" H:i", strtotime($node->field_datum['und'][0]['value2']));?> | ||
<?php print strftime( "%d. %B %Y", $datum_von)?><?php echo $datum_von_t;?><?php print t(" to ");?> <?php echo $datum_bis;?> </br> | <?php print strftime( "%d. %B %Y", $datum_von)?><?php echo $datum_von_t;?><?php print t(" to ");?> <?php echo $datum_bis;?> </br> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Java Scripts jQuery== | ==Java Scripts jQuery== | ||
* [[Flex-Slider]] | * [[Flex-Slider]] | ||
* [[Isotope Bildergalerie]] | * [[Isotope Bildergalerie]] | ||
Version vom 4. Oktober 2013, 18:06 Uhr
Field Felder unter Drupal 7
Aktuelle Sprache zurückgeben Drupal 7
<a href="/<?php print $language->prefix ?>/home"><div class="art-headerobject"></div></a>
<?php print $language->prefix ?>
If Akteuelle Sprache
<?php
global $language;
if ($language->language == 'it') {
print "HTML Italiano...";
}
else {
print "HTML English...";
}
?>
backlink
<div class="backlink"><a href="/referenzen" target="_self"><?php print t("back to reference")?></a></div>
Text beim Teaser ein / ausblenden Drupal 7
einblenden:
<div class="weiterlesen">
<?php if ($teaser): ?>
<a href="<?php print $node_url; ?> " title="read more"><?php print t("read more") ?></a>
<?php endif;?>
</div>
ausblenden
<?php if (!($teaser !== false)): ?>
<a href="/katalog" target="_self"><?php print t("back to Catalog") ?></a>
<?php endif;?>
Aktuelle Sprache BLOG
<div class="weiterlesen">
<?php if (!($teaser !== false)): ?>
<a href="/<?php
if (function_exists('locale_language_url_rewrite_url')) {
locale_language_url_rewrite_url($request_path, $options);
}
print $prefix = rtrim($options['prefix'], '/');
?>/blog"><?php print t("back to blog") ?></a>
<?php endif;?>
</div>
fieldset
<fieldset class="collapsible collapsed">
<legend><span class="fieldset-legend">Who's the master!?</span></legend>
<div class="fieldset-wrapper"><p>Sho' Nuff!</p></div>
</fieldset>
Text übersetzen Hardcodiert
<?php print t("back to Gallery") ?>
Datum / Date Feld
<?php
if (function_exists('locale_language_url_rewrite_url')) {
locale_language_url_rewrite_url($request_path, $options);
}
$prefix = rtrim($options['prefix'], '/');
if ($prefix==de) setlocale(LC_TIME, "de_DE.UTF8");
if ($prefix==fr) setlocale(LC_TIME, "fr_FR.UTF8");
if ($prefix==en) setlocale(LC_TIME, "en_EN.UTF8");
if ($prefix==it) setlocale(LC_TIME, "it_IT.UTF8");
?>
<?php $datum_von = date(strtotime($node->field_datum ['und'][0]['value']));?>
<?php $datum_von_t = date(" H:i", strtotime($node->field_datum['und'][0]['value']));?>
<?php $datum_bis = date(" H:i", strtotime($node->field_datum['und'][0]['value2']));?>
<?php print strftime( "%d. %B %Y", $datum_von)?><?php echo $datum_von_t;?><?php print t(" to ");?> <?php echo $datum_bis;?> </br>