Customizing Kentico Kontent - kentico-kontent

Is there a way to customize Kentico Kontent (cloud) to add a plugin?
Requirements for the plugin:
Can have HTML UI
Loads on every content item
Can extract text from content elements
Can select specific words from content item
Can modify specific words from content item
Does Kentico Kontent provide JS API for editing and modifying content in content item?
Thanks,
Abhijeet

Yeah, they're called custom elements.
HTML UI is actually required in order for a custom element to work
Multiple custom elements can be included in every content item
Use the getElementValue() method + you can access the context object to retrieve additional information + you can observe changes in other elements
You can achieve that with your custom logic
So far, you can only modify the contents/value of the custom element itself
Browse the gallery of sample custom elements: https://kentico.github.io/kontent-custom-element-samples/gallery/
Get inspired by their code: https://github.com/Kentico/kontent-custom-element-samples

Related

Disable click event in list view that goes to Delve

I have a list that has names from Active Directory. When the view of the list is put on a web part page the name field is clickable, bringing the user to the home page of delve of the person. We would like to disable that so people don't go to Delve.
Can this be done with CSS to disable all opening events on list with exception of the list name.
You can use CSR (Client Side Rendering) to override column rendering logic.
This is javascript code that can be added by different ways:
1. You can add Content Editor (or Script Editor) Web Part with this CSR javascript to list view page and your column will be changed.
2. You can open list view web part settings on list view page and in Miscellanious section set JSLink property to url of CSR javascript file.
CSR javascript file you can locate in some library, ex.Style Library or Site Assets.
CSR allow to change view, column rendering logic.
Now your field "name" rendered as link (<a> tag). You can override this logic. You can override logic to render as plain text or label or span or something not clickable.
If you don't want to learn CSR then use plain javascript to change your column rendering logic. Use same methods to add javascript to view but use plain javascript. Just define how to find your column on page and change it on page load.
By my opinion it is not good way but you can create text column and populate it by workflow. Like here:
https://sharepoint.stackexchange.com/questions/218041/last-name-calculated-field-from-person-field/218045#218045
https://social.technet.microsoft.com/Forums/en-US/a463eefe-4a07-40b7-a489-b896b93219ea/workaround-to-using-quotperson-or-groupquot-field-in-a-quotcalculatedquot-column-formula?forum=sharepointgenerallegacy
Later you can add this text column in view and remove clickable column from view.

Experience Editor custom functionality

In some of our pages, we have a component that is a list of links. In Sitecore, this is stored in the following manner -
- Component data source
- list item 1
- list item 2
- list item 3
Right now the Sitecore users can only add links to the list by going into the Content Editor and manually adding a list item. This is not very convenient for users as they have to constantly switch between Content and Experience Editor.
I would like to provide a functionality in the Experience Editor itself which can allow users to add these link items using a layover type functionality.
I did a quick search and wasn't able to find anything concrete. Is there a way to update achieve this functionality?
You should create a custom WebEdit button which will allow to add children to your datasource.
You can read more about it here Sitecore Page Editor: Creating a WebEdit button

How can I display a specific Edit Form based on the current View?

I have a few custom Edit forms I've created in SharePoint Designer for the same content type. Is there any way to bind a specific edit form to each list view or user group natively in SharePoint, or will I have to write something to handle the logic?
Modifications through javascript can be bound to content types or list templates through elements.xml (farm solution) however to set custom forms (application pages), you will have to do this through a script (powershell).
You should be able to loop through the lists and just set the URL for the edit-form. There is a EditFormUrl parameter on the SPContentType object and an equivalent will exist for powershell of course.

Create Word document of complete list (multiple list items)

I have a Sharepoint 2010 Custom List. I have created a Nintex Workflow to get all the data from the list i need and wrote it into a variable that contains a HTML table. Unfortunatelly Word only sees the code and not the table when i use this variable in a Content field in Word.
What i need is a way to get the filtered items of the list into a Word document (template) as a table.
I know how to do it with a single List Item but not for the complete list. With the Single item it works great with Content Controls but not for multiple items.
We use Sharepoint 2010 and Nintex. My knowledge of JS is zero and we are not allowed to use SPD.
This is not possible with nintex workflow. You need to create a custom workflow using visual studio to achieve this kind of behavior.
You could build an HTML file via a Build String and Web Request (w/ PUT) actions. Then use the Convert Document action to convert it into a Word doc.

Sitecore Web Forms for Marketers - Complex custom field

The client wants to be able to display, within a WFFM form, a list of Sitecore items (each item containing an image & some HTML text), each item next to a checkbox to allow the end user to pick one or more of these items.
Within the form designer, for this particular field, we would like to have an item selector which can be used by the content editor to pick and choose which items to display in the list.
Is this something feasible in WFFM? Are there examples of complex custom form fields that I could take a look at? Thanks!
I just found out that what I asked can be easily accomplished with the ChechboxList field type already provided by WFFM and some CSS styling to handle the content of each item.
Thanks and sorry for the post.