[solved]FC 1.5.6 (r862)-itemview (blog) values not displayed

More
12 years 8 months ago #18430 by ggppdk
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

:D


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #18445 by Rehne

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

:D


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
Attachments:

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #18450 by micker
thanks for reporting rehne

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #18452 by Rehne
with pleasure

you all invest so much work/time for the projekt FC
i like to give something back
even if it's just a little thing

Regards

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #18469 by ggppdk
mmmm,
in item view, the following will work if you place favourites in any position

$this->fields->display;
$this->item->fields->display;

in category view, the following will work if you place favourites in any position

$this->items[2]->fields->display;


I have tested this. Also why you say item view for template blog. The blog template does not have an item view.

The items displayed in blog when clicked will be displayed in some other template that has item view.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 8 months ago #18512 by Rehne

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
:D


hi ggppk

well
I have tested it again
when I use the original blog template (SVN 862)

i can even put fields in positions only for the categories layout in the template manager
there is no position 'renderonly'
not even in the item layout
right?

so, when i use it (without changes) to view an item
no field values like title, text, created_by, modified_by, voting, favourites, categories, tags
set in the template parameters will be shown (see the attachment FC-1-5-6-r862_tpl_blog_item_original_missing_values)

with my changes that I have described in the previous post
it works (attachment FC-1-5-6-r862_tpl_blog_item_modified_with_values)

Regards
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.900 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline