Structured data

More
8 years 11 months ago #63107 by Chabi01
Structured data was created by Chabi01
Just to understand correctly how to use this.
Until now, i use the structured data directly in my template (as i write FC template by hand, more easy for me).
I can see Flexicontent can now handle in the field the structure data name.
Ok. let's try.
In category list, i set up the "type" and that's ok : the structured data works well.
Now, in the content view, i have no structured data shown (nor even the same structured as in category).
So i have 2 questions :
- is there some code to call the structured data in my template (i use the usual "<?php echo $this->fields->display; ?>" ?
- If not, how to set up properly the structured data to get this working in content item ?

I read this page : www.flexicontent.org/item/611-microdata-...ully-compatible.html
but this is not enough explain...
Thanks for the help on this really important point.
Xavier

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

More
8 years 11 months ago #63119 by micker
Replied by micker on topic Structured data
you need to update your template compare item.php of default template and add code inside

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
8 years 11 months ago #63122 by Chabi01
Replied by Chabi01 on topic Structured data
Hi Micker,
I didn't undestand your solution... Could you be more specific ?
Thanks !

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

More
8 years 11 months ago #63123 by micker
Replied by micker on topic Structured data
if you check item.php code you can see (in modular)
Code:
// SEO $microdata_itemtype = $this->params->get( 'microdata_itemtype'); $microdata_itemtype_code = $microdata_itemtype ? 'itemscope itemtype="http://schema.org/'.$microdata_itemtype.'"' : ''; ?> <?php echo '<'.$mainAreaTag; ?> id="flexicontent" class="<?php echo $page_classes; ?> group" <?php echo $microdata_itemtype_code; ?>> <?php if ($this->params->get('show_title', 1)) : ?> <!-- BOF item title --> <?php echo '<h'.$itemTitleHeaderLevel; ?> class="contentheading"> <span class="fc_item_title" itemprop="name">
you need to adapt it for your custom template

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
8 years 11 months ago - 8 years 11 months ago #63125 by Chabi01
Replied by Chabi01 on topic Structured data
Ok, i'm trying to understand you.
If i'm right, you tell me to copy paste the code in the templates include in FC, right ?
Ok, in all the template, there is this code :
Code:
<?php // SEO $microdata_itemtype = $this->params->get( 'microdata_itemtype'); $microdata_itemtype_code = $microdata_itemtype ? 'itemscope itemtype="http://schema.org/'.$microdata_itemtype.'"' : ''; ?> <?php echo '<'.$mainAreaTag; ?> id="flexicontent" class="<?php echo $page_classes; ?>" <?php echo $microdata_itemtype_code; ?> >
Ok. If i include this code, that's work as before but i have always in the test results : "Type not specified".
In the category_item.php, i can see :
Code:
// MICRODATA document type (itemtype) for each item // -- NOTE: category's microdata itemtype is fallback if the microdata itemtype of the CONTENT TYPE / ITEM are not set $microdata_itemtype = $item->params->get( 'microdata_itemtype') ? $item->params->get( 'microdata_itemtype') : $microdata_itemtype_cat; $microdata_itemtype_code = $microdata_itemtype ? 'itemscope itemtype="http://schema.org/'.$microdata_itemtype.'"' : '';
It seems to be the same, but why then the type is not raised correctly in the item template as in the category list ?
Last edit: 8 years 11 months ago by Chabi01.

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

More
8 years 11 months ago - 8 years 11 months ago #63126 by Chabi01
Replied by Chabi01 on topic Structured data
I could say this in another way : what is the correct piece of code to included in a template to get microdata working in items ? (maybe i don't take the good one)...
Note this : the template is the same than a regular template included in FC : the only differences is that i call my fields directly unstead of using the templates positions by default (putting all the fields in renderonly in the template manager).
The code is otherwise the same.
Last edit: 8 years 11 months ago by Chabi01.

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.398 seconds
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
Save