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

More
12 years 8 months ago - 12 years 7 months ago #18379 by Rehne
FC 1.5.6 (r862)
in itemview no values ​​for the FIELDS
title, text, created_by, modified_by, voting, favourites, categories, tags
will be shown

in reference to the post by ggppdk

Also in future versions (1.5.6) you can use this:
echo FlexicontentFields::getFieldDisplay($this->item, 'modified');
To create and retrieve the display of the field, without any other changes to the template

www.flexicontent.org/forum/index.php?f=20&t=3509&rb_v=viewtopic

there would have to be changed like the following in the item.php of the standard FC blog template

or I understand something wrong???
Code:
<?php echo $this->escape($this->fields['FIELDS']->display); ?>

must be replaced with
Code:
<?php echo FlexicontentFields::getFieldDisplay($this->item, 'FIELDS'); ?>

for example
Code:
<?php if ($this->params->get('show_tags', 1) && $this->fields['tags']->display) : ?> ...
to
Code:
<?php if ($this->params->get('show_tags', 1) && (FlexicontentFields::getFieldDisplay($this->item, 'tags') != '')) : ?> <span class="tags"> <span class="fclabel"><?php echo $this->fields['tags']->label; ?></span> <span class="fcvalue"><?php echo FlexicontentFields::getFieldDisplay($this->item, 'tags') ?></span> <?php endif; ?>


and has this

Notice: Undefined property: stdClass::$display in \components\com_flexicontent\templates\blog\item.php on line ...

www.flexicontent.org/forum/index.php?f=29&t=3625&rb_v=viewtopic
something to do with it ???
Last edit: 12 years 7 months ago by Rehne.

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

More
12 years 8 months ago #18395 by ggppdk
==> 1. Edit your item.xml and your category.xml and create one more position named 'renderonly' or whatever name you like.
[attachment=0:2mnxl6o1]<!-- ia0 -->demo1.jpg<!-- ia0 -->[/attachment:2mnxl6o1]
==> 2. Then clean cache
==> 3. Go to the template manager and drag & drop: your field e.g 'modified' to the new position.
==> 4. Inside your template file item.php use:
$this->item->positions->modified->label
$this->item->positions->modified->display
First is the Field's Label and Second the output of the field. The 'modified' is the name of the field could anything you named your field e.g. 'mynameABCD'


The other way is:

<?php echo FlexicontentFields::getFieldDisplay($this->item, 'modified'); ?>

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

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

More
12 years 8 months ago #18396 by ggppdk
About tags it is a core field and not a custom field, also it is a special kind of field too, i must check if the code works properly for this case ...

Maybe the renderonly position is a more clean way because you have a view of which fields you are outputting manual and not automatically by placing them in some other position.

Thank you for reporting


-- 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 #18416 by Rehne
thank you ggppdk
i understand
and am doing that in my own custom templates

but i wanted to show or ask for
if there ist a bug in the standard FC blog template
which i downloaded from SVN (r862)

when I use that
the 'standard FIELDS'
title, text, created_by, modified_by, voting, favourites, categories, tags
will not be shown

isn't it not adapted to FC 1.5.6 yet?

in version 1.5.4 (r607) there was no need for to make any changes on the item.xml file
there are no positions (fieldgroups) listed


Regards

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

More
12 years 8 months ago #18418 by ggppdk
All fields that you need to display, need to be assigned to a template position.

The core fields must also be put to some position,
preferably "renderonly" position and then you can output them as you like.

Is that what you are asking ???

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 #18428 by Rehne
Excuse my bad English :(

ggppdk.... All fields that you need to display, need to be assigned to a template position.

The core fields must also be put to some position,
preferably "renderonly" position and then you can output them as you like.

Is that what you are asking ???

no

I'll try it again
i downloaded the latest SVN (r862) 1.5.6 and build an installable zip using the build.xml
and install FC
there are two templates included FC default and blog

the blog template doesn't work in the item view like FC 1.5.4 (r607)without changes as explained in post bellow

My question is therefore (or is it just a hint for you ?) is the FC core template blog adapted to FC 1.5.6 yet or not?
or you have to do that yet?

in my own templates with core and own fields everything works!!!

ggppdk....About tags it is a core field and not a custom field, also it is a special kind of field too, i must check if the code works properly for this case ...

I've tried it as described above
and it works
Code:
<?php if ($this->params->get('show_tags', 1) && (FlexicontentFields::getFieldDisplay($this->item, 'tags') != '')) : ?> <span class="tags"> <span class="fclabel"><?php echo $this->fields['tags']->label; ?></span> <span class="fcvalue"><?php echo FlexicontentFields::getFieldDisplay($this->item, 'tags') ?></span> <?php endif; ?>

Regards
Attachments:

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.702 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