Commit d2779809 authored by Dries's avatar Dries

- Patch #999040 by Niklas Fiekas: corrected alternative control structure...

- Patch #999040 by Niklas Fiekas: corrected alternative control structure syntax in theme templates.
parent 245db071
......@@ -24,19 +24,19 @@
</h3>
<div class="feed-item-meta">
<?php if ($source_url) : ?>
<?php if ($source_url): ?>
<a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
<?php endif; ?>
<span class="feed-item-date"><?php print $source_date; ?></span>
</div>
<?php if ($content) : ?>
<?php if ($content): ?>
<div class="feed-item-body">
<?php print $content; ?>
</div>
<?php endif; ?>
<?php if ($categories) : ?>
<?php if ($categories): ?>
<div class="feed-item-categories">
<?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
</div>
......
......@@ -18,6 +18,6 @@
<a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>
<span class="age"><?php print $feed_age; ?></span>
<?php if ($source_url) : ?>,
<span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span>
<?php if ($source_url): ?>,
<span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span>
<?php endif; ?>
......@@ -11,8 +11,8 @@
* render() on each to print it as an unordered list.
*/
?>
<?php foreach ($book_menus as $book_id => $menu) : ?>
<div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
<?php print render($menu); ?>
</div>
<?php foreach ($book_menus as $book_id => $menu): ?>
<div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu">
<?php print render($menu); ?>
</div>
<?php endforeach; ?>
......@@ -40,7 +40,7 @@
*/
$div_close = '';
?>
<?php for ($i = 1; $i < $depth; $i++) : ?>
<?php for ($i = 1; $i < $depth; $i++): ?>
<div class="section-<?php print $i; ?>">
<?php $div_close .= '</div>'; ?>
<?php endfor; ?>
......
......@@ -35,13 +35,13 @@
<?php if ($has_links): ?>
<div class="page-links clearfix">
<?php if ($prev_url) : ?>
<?php if ($prev_url): ?>
<a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a>
<?php endif; ?>
<?php if ($parent_url) : ?>
<?php if ($parent_url): ?>
<a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a>
<?php endif; ?>
<?php if ($next_url) : ?>
<?php if ($next_url): ?>
<a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a>
<?php endif; ?>
</div>
......
......@@ -49,11 +49,11 @@
HTML comment.
-->
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
<?php if (!$label_hidden) : ?>
<?php if (!$label_hidden): ?>
<div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:&nbsp;</div>
<?php endif; ?>
<div class="field-items"<?php print $content_attributes; ?>>
<?php foreach ($items as $delta => $item) : ?>
<?php foreach ($items as $delta => $item): ?>
<div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div>
<?php endforeach; ?>
</div>
......
......@@ -30,7 +30,7 @@
*/
?>
<div class="container-inline">
<?php if (empty($variables['form']['#block']->subject)) : ?>
<?php if (empty($variables['form']['#block']->subject)): ?>
<h2 class="element-invisible"><?php print t('Search form'); ?></h2>
<?php endif; ?>
<?php print $search_form; ?>
......
......@@ -45,7 +45,7 @@
* for its existence before printing. The default keys of 'type', 'user' and
* 'date' always exist for node searches. Modules may provide other data.
* @code
* <?php if (isset($info_split['comment'])) : ?>
* <?php if (isset($info_split['comment'])): ?>
* <span class="info-comment">
* <?php print $info_split['comment']; ?>
* </span>
......@@ -69,10 +69,10 @@
</h3>
<?php print render($title_suffix); ?>
<div class="search-snippet-info">
<?php if ($snippet) : ?>
<?php if ($snippet): ?>
<p class="search-snippet"<?php print $content_attributes; ?>><?php print $snippet; ?></p>
<?php endif; ?>
<?php if ($info) : ?>
<?php if ($info): ?>
<p class="search-info"><?php print $info; ?></p>
<?php endif; ?>
</div>
......
......@@ -21,7 +21,7 @@
* @see template_preprocess_search_results()
*/
?>
<?php if ($search_results) : ?>
<?php if ($search_results): ?>
<h2><?php print t('Search results');?></h2>
<ol class="search-results <?php print $module; ?>-results">
<?php print $search_results; ?>
......
......@@ -25,7 +25,7 @@
*/
?>
<section class="<?php print $classes; ?>">
<?php if ($title) : ?>
<?php if ($title): ?>
<h2><?php print $title; ?></h2>
<?php endif; ?>
......
......@@ -6,7 +6,7 @@
<span class="submitted"><?php print $submitted ?></span>
<?php if ($new) : ?>
<?php if ($new): ?>
<span class="new"><?php print drupal_ucfirst($new) ?></span>
<?php endif; ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment