Assets with multiple content types duplicating values - kademi

When adding additional content type tag on an existing asset it duplicates the values in the fields.
What I am trying to achieve:
There are trainers on NZ site and some of them also goes on AUS site.
So I have created a content type "trainersNZ" which applies to all NZ trainers. Some of them that needs to go on AUS site so I created another content type "trainerAUS" and applied both content types to the same asset but now there is duplication issue.
Screenshot attached below.
https://www.dropbox.com/s/p36ltk4k9ufo8vv/Screen%20Shot%202019-08-05%20at%201.00.14%20PM.png?dl=0

Ideally you would have a content type structure where your fields only appear on one type.
Eg have a content type called "trainer" which has the appropriate fields, and then have marker types for trainerAu and trainerNz. All assets would have the trainer type, and just tag assets onto the appropriate au/nz types as needed.
However, I've pushed an update so if there are duplicate field names the input will only be shown once on the management page, so you might find that you can continue with the current structure.

Related

How to expose product data to Policy List on SPCRM

On SPCRM I'm trying to expose Product Name on the Policy List page, inside the column called: Insurance Type.
Using inspect and console tool I could not locate the missing data
I am logged in as this user:
https://spinsurance.admin.kademi.com.au/manageUsers/116783806/#summary-tab
Policy List page:
https://crm.spinsurance.co.nz/leads/?query=&leadType=active&from=0&size=100
The product data is only exposed once you click a policy (under Insurance Type section):
example: https://crm.spinsurance.co.nz/leads/148615383/
I would like to know where / how I can update the lead/policy query to also include product data (Insurance Type) within the Policy list page.
OK, so assuming you have a custom field on your journey to hold the insurance type, similar to this example which has a field called "claim_recordId"
Then the JSON response on the leads page will include that in the fields object, eg:
You can then customise the JS for the leads page to show that field in a column

Can we create different users which see specific content types in Strapi?

Do we have the possibility to create different users which see specific content types in Strapi?
Yes, you'd just need to create a tagging system, you can do this by creating a user field, that takes in a list of tags essentially then associate content to user tags and vice versa to give you a many to many scenario.

Overview of all fluidcontent FCEs

For complex TYPO3 project using fluidcontent I'm looking for a tool, which show me the followering informations:
which FCE exists
how often and on what pages are they in use
which partials are used
which flux form fields are used (with name and type)
diposit some meta informations, e.g. tags, description ...
How would be the smartest way to implement this library in a typo3 project?
My idea is, to develop an extension which read the fluidcontent templates and show the informations in a frontend plugin with examples. But i have no idea to read out the information like "used partials" or "used flux form fields".
Any ideas?
Thanks.
FCE's are just cType elements in the tt_content table. you can write a simple query to count the different cTypes, thus gives you a list with all the used FCE's on your site. you can know on witch page they are used because every tt_content entry has a pageUId
for the flux fields. you will have to create a function that fetch all content elements that uses flux and then parse all the flexform fields. note that flux can also store data in other fields then flexform xml.
you can create a basic extbase plugin for this to show it in the front or backend

Store translated versions in database for Joomla component

I'm currently developing my first MVC component for Joomla 3.x. All in all I'm bit struggling with language/translation issues in database.
My problem is that I need to store translated content of user generated content which comes from the backend. For example someone enters a new item in German (stored in database) and needs a translation in another language. How to accomplish that in Joomla? I don't like to generate a new item for every different language when the rest is all the same.
I thought about a table "item" and a table "item_language" with that structure (strongly simplified for viewing purposes):
item
id PRIMARY INT
price DOUBLE(4,2)
item_language
itemid PRIMARY INT
language PRIMARY CHAR(5)
name VARCHAR(50)
In item_language I would like to store the different translated versions. In the language field there would be the region code (eg. de-DE) to identify the language.
My problems:
How to display the different (translated) versions in backend?
Is this the right database model?
Any help is appreciated!
You have really found yourself a nice task for a first component in Joomla!
A rather generalist answer:
The database model seems right. Alternatively you could encode in JSON the language data, but this could make later query operations potentially difficult. This way you will only have one table to work with.
As far as I know (if you are using JModel / JTable to manipulate the data) can't do this directly, as JTable is really only designed to manipulate single tables.
What you can do:
For editing: figure a way to represent this graphically ( for your users to see and edit this one to many relationship) and to post this data (language texts as an array) to JModel. In the model you can maintain the desired relationships and save the data using JTable.
Viewing (without editing) shouldn't be an issue, it would be a simple JOIN.
If you are willing to create a basic component on github, I might even give you a hand with JModel / JTable.
I found a way to deal with the things I needed.
Thanks Valentin Despa for guiding me in the right direction :-).
Here the whole procedure (simplified - validations and exact steps omitted):
Define the form fields in the models/forms/site.xml as normal.
In views/site/tmpl/edit.php add self coded Javascript (based on jQuery) to deal with the fields which have content in multiple languages stored as JSON in database.
Clone the original form element and modify the needed attributes (id, name, ...) to display a special version just for the defined languages. As content - extract the JSON for the needed language from original field content and display.
Hide the original field with Javascript and append the customized versions to DOM.
Afterwards in tables/site.php I read the dynamically generated content withJInput and build together the original field by generating JSON and saving to database.
It's working like expected.

CRM 2011 - How to update Marketing List Member Type options to reflect entity display name changes?

Is there a way of updating the Option Set options for the Marketing List Member Type to reflect an entity display name change? i.e. if the account entity has been renamed to organisation, is there a supported way of reflecting this in the displayed options? I have been able to achieve this using javascript, but wondered if there was a better way of achieving this? At the moment I am unable to change the descriptions of the current options: Account, Contact or Lead.
Simple solution..
Create a Solution in your crm org. Add Marketing list to it.
Export the translations from the solution and when you open the translation excel file you will see all 3 picklist values.
from there you can change the values.
If you have to rename an existing entity, you should also rename its 'messages'.
You will find them in the customization area. Open the entity account. There you will find 'messages'. These are the strings which are used for the entity.
For a complete renaming, you have to replace the term 'account' in these messages.
It's just a normal Option Set on the Marketing List entity called "createdfromcode" which has three options (Account, Contact, Lead) and the underlying values match the entity type codes (1,2,4).
You can't edit this option set directly, but you could set up your own with appropriate values and the labels you want to use, add that option set to the form and use javascript to copy the selected value into the existing field (which you keep on the form but not visible).

Resources