Theme und Theming: Unterschied zwischen den Versionen
Erscheinungsbild
| Zeile 9: | Zeile 9: | ||
==If Akteuelle Sprache== | ==If Akteuelle Sprache== | ||
<syntaxhighlight lang="html4strict" line start="1" highlight="5" enclose="div"> | <syntaxhighlight lang="html4strict" line start="1" highlight="5" enclose="div"> | ||
<?php | <?php | ||
global $language; | |||
if ($language->language == 'it') { | |||
print "HTML Italiano..."; | |||
} | |||
else { | |||
print "HTML English..."; | |||
?> | } | ||
?> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Version vom 19. August 2013, 15:47 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") ?>