Contentful - How to add/manage multiple fields from a Contentful App? - contentful

I want to add 3 custom fields to my content model
By going the field extension route, I would have to create an app for each field that I want and that would mean host each of them separately and configure them individually with my contentful space.
So I was wondering if I can use the contentful app for my use case?
But it seems I can have only 1 field in my app. Is that true?
for eg. If I want to have 3 fields such as
Categories, Sub-categories, Tags as 3 custom fields, If I add them as 3 fields in my Field.tsx of the contentful app, how do I sent value in the sdk for a given field?
eg. this.props.sdk.field.setValue(), how do I select which field to set the value for?

Related

Include Shopware 5 default contact form in a shopping world?

I have a shopping world which acts as the "contact" page and now I want to include the default contact form of Shopware 5.
Is there a way to do this with some file include function passing the form ID or any other way?
there are a number of plugins that enable this functionality: https://store.shopware.com/search?p=1&q=Einkaufswelt%20formular&shopwareVersion=5 .
When you want do it on your own, you have to create a own shopping world element and include the corresponding template file https://github.com/shopware/shopware/blob/5.7/themes/Frontend/Bare/frontend/forms/form-elements.tpl and and you have to reinitialize the javascript functionalities from the form.

How to create custom field in Shopware 6 and show it on frontend?

How do i make a custom created field in Shopware 6 and show it on the frontend/storefront by using a Twig file?
Go to Settings > System > Custom Fields -> Add new set. Or Add field to existing Custom field set.
Add this to the Twig template:
{{context.salesChannel.customFields.your_custom_field | trans}}
Change SalesChannel to the type the custom field is associated with.
Change your_custom_field to the “technical name” specified in the custom field. “trans” is added to get the local translation.
You may take a look at the official docs.

Drupal 8 - Display one image from multifield based on the title attribute

I'm working on a Drupal 8 project and having issues trying to access one particular image of an image multifield, eg {{field_images}}.
I have a View with Exposed Filters which returns a list of nodes based on selected taxonomy terms. One of those taxonomy terms, has values that may match the title field of images contained within field_images.
The view displays a teaser list of content based on the filters, which then links to the full node content page.
Normally, the node list returned in the view will only display the first image from the multifield, displayed in the template like this {{ content.field_images.0}} or by simply limiting the images returned in the view itself.
However, in the case that an exposed filter value in the view, say "bathroom" is selected, I want to be able to find an image from field_images that has "bathroom" in the title and display that instead.
Is there any way using either twig logic or views that I can achieve this?
Thanks so much for any assistance anyone may have!

How to access nested Part properties in Email Workflow?

I have a Registration ContentType, which contains a ContentPicker field for a Building Item, which contains a Geolocation Part with some properties like Latitude and Longitude.
When a new Registration is Published, it triggers a custom Workflow that sends out an email. In the body of the email I can get to the fields of the Building using tokens like this: {Content.Fields.Registration.Building.Content.Fields.Building.Address}
How can I get to the property values of the Geolocation Part contained within the Building? Can I do something like this? {Content.Fields.Registration.Building.Content.Parts.Geolocation.Latitude}
I'm new to Orchard and I can't figure out how it's structured. Can this be done out of the box or will I have to write a custom token?
If you know which content item to take from the content picker field (for example if it always is only one), then the following might work:
{Content.Fields.Registration.Building.Content.Fields.Building.ContentItems[0].Geolocation.Latitude}
This is assuming your Building field is configured to pick content types with a Geolocation part

Sort articles by template variable

I have built a website (with MODX) where some products are managed and displayed via the articles addon. The products should have a custom ordering but I don't know how to use a template variable for that.
If I enter the name of the TV in the "Sort Field" field nothing is shown at all.
So is it somehow possible to use a TV there?
Or is there another way to achive a custom ordering (note that I need the summary and date fields, so I cant't abuse them for that)?
You can do this by using getResource package. Look at sorbyTV, sortdirTV, sortbyTVType parameters in manual:
http://rtfm.modx.com/extras/revo/getresources#getResources-SelectionProperties

Resources