Clarification needed on raw field value usage

More
8 years 1 month ago #64938 by grabit
HI,

I need to enter a value twice in a field for a project.

here is the code I have to generate:
Code:
<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-57129373" itemscope itemtype="http://schema.org/Product" data-single-product-id="57129373" ><div itemtype="http://schema.org/Offer" itemscope itemprop="offers">

The "57129373" value is used twice.

I was trying to use a text field called "ecwid-item-id" to enter that value with that scheme {{fieldname##nn}} so it was looking like that: {{ecwid-item-id##0}} but it doesn't render and I find {{ecwid-item-id##0}} in my code instead of the value.

Here is the rendered code:
Code:
<div class="ecwid ecwid-SingleProduct ecwid-Product ecwid-Product-57129373" itemscope="" itemtype="http://schema.org/Product" data-single-product-id="{{ecwid-item-id##0}}"><div itemtype="http://schema.org/Offer" itemscope="" itemprop="offers"><div class="ecwid-productBrowser-price ecwid-price" itemprop="price"></div></div><div customprop="options"></div><div customprop="qty"></div><div customprop="addtobag"></div></div>

What means the nn? The ID of the field, the value ID in case of multiple value field.

For now I am using 2 fields with the same value entered twice (ecwid-display and ecwid-item-id)

Is it possible to use only one field and to replicate it inside the prefix?

Where I am wrong?

An Apple a days keeps the doctor away

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

More
8 years 1 month ago #64944 by ggppdk
Hello

you can create a text field

copy its default layout file and create a new layout,
(just see popup description of parameter "View layout")

and then select the new layout in the "View layout" parameter

then edit the layout file and use values of other fields:
www.flexicontent.org/documentation/faq/7...stom-field-type.html


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

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