ggppdk wrote: Rehne, I see what you mean, no the template blog (in FC 1.5.6 (r862) ) was supposed to work properly,
so must check and fix this, thank for reporting
Hi ggppdk,
I've made some necessary and usefule changes
and everything works fine
you can save your time
here are my changes (attached file)
and to explain
blog\item.php
old
Code:
<?php echo $this->escape($this->fields['title']->display); ?>
<?php echo JText::sprintf('FLEXI_WRITTEN_BY', $this->fields['created_by']->display); ?>
<?php echo JHTML::_('date', $this->fields['created']->value[0], JText::_('DATE_FORMAT_LC2')); ?>
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->fields['modified']->value[0], JText::_('DATE_FORMAT_LC2'))); ?>[
<?php echo JText::sprintf('FLEXI_BY', $this->fields['modified_by']->display); ?>
new
Code:
<?php echo $this->escape($this->item->title); ?>
<?php echo JText::sprintf('FLEXI_WRITTEN_BY', $this->escape($this->item->creator)); ?>
<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2'))); ?>
<?php echo JText::sprintf('FLEXI_BY', $this->escape($this->item->modifier)); ?>
old
Code:
<?php echo $this->fields['voting']->display; ?>
<?php echo $this->fields['favourites']->display; ?>
new
Code:
<?php echo FlexicontentFields::getFieldDisplay($this->item, 'voting'); ?>
<?php echo FlexicontentFields::getFieldDisplay($this->item, 'favourites'); ?>
old
<span class="fcvalue"><?php echo $this->fields->display; ?></span>
...
<?php if ($this->params->get('show_tags', 1) && $this->fields->display) : ?>
<span class="fcvalue"><?php echo $this->fields->display; ?></span>[/code]
new
Code:
<span class="fcvalue"><?php echo FlexicontentFields::getFieldDisplay($this->item, 'categories'); ?></span>
...
<?php if ($this->params->get('show_tags', 1) && (FlexicontentFields::getFieldDisplay($this->item, 'tags') != '')) : ?>
<span class="fcvalue"><?php echo FlexicontentFields::getFieldDisplay($this->item, 'tags') ?></span>
blog\itm.xml
new
Code:
<group>renderonly</group>
default\item.php
old
Code:
<?php if (isset($this->item->positions['description'])) : ?>
<!-- BOF description -->
<div class="description">
<?php foreach ($this->item->positions['description'] as $field) : ?>
<?php if ($field->label) : ?>
<div class="desc-title"><?php echo $field->label; ?></div>
<?php endif; ?>
<div class="desc-content"><?php echo $field->display; ?></div>
?php endforeach; ?>
</div>
<!-- EOF description -->
<?php endif; ?>
new
Code:
<?php if (isset($this->item->positions['description'])) : ?>
<!-- BOF description -->
<div class="description">
<?php foreach ($this->item->positions['description'] ...
...
?php endforeach; ?>
</div>
[b]<?php else: ?>
<div class="description">
<div class="desc-content">
<?php echo FlexicontentFields::getFieldDisplay($this->item, 'text'); ?>
</div>
</div>[/b]
<!-- EOF description -->
<?php endif; ?>
and for me, always very useful in my custom templates
default\item.xml
new
Code:
<param name="show_title" type="list" default="1" label="FLEXI_SHOWTITLE" description="FLEXI_SHOWTITLE_DESC">
<option value="">Use Global</option>
<option value="0">No</option>
<option value="1">Yes</option>
</param>
Regards