Discussions
Tutorial or example of Multilanguage?
I'm not really understanding the instructions on how to make multi language work with the text editor. I just want to be able to add French or English. Do you have a template or example of one that is already finished?
So far I made an options.json file and put it in the /OpenContent/Files directory
Posted by Paul almost 5 years ago
Is there a token that either is show or hide if Admin or role based
Handlebar token for DNN roles? Is there a way to do that inside the main template?
Posted by Dustin Peterson almost 5 years ago
Check if date current in helper.
Hi guys,
Struggling to write a custom helper, inside of my template.hbs I have created `checkActive` to see if the moment from the context given is past a certain point, however attempting to use the following code in a block will throw an error.
```
<script>
Handlebars.registerHelper('checkActive', function (context) {
if (window.moment && context && moment(context).isValid()) {
return moment(context) =< moment();
} else {
return context; // moment plugin is not available, context does not have a truthy value, or context is not a valid date
}
});
</script>
```
```
<div class="text">Clos{{#checkActive Dates.EndDate}}ed{{else}}ing{{/if}}</div>
```
```
Failed to render Handlebar template Portals/0/OpenContent/Templates/.../template.hbs
Value cannot be null.
Parameter name: test
```
Posted by Jake almost 5 years ago
open and close dates
A client wishes to add an active date to the opencontent data and show if the current date is passed the active date.
Is this possible with handlebars, I've looked at using a custom handlebars function but the Handlebars.registerHelper function is not working.
Has anyone used custom handlebars functions and if so can you please outline how to add them to a module.
Posted by Damian almost 5 years ago
Ability for Image Gallery to have Title field for each image
Is it possible or can we add that ability to assign a title per each image for the Image Gallery field type that allows for multiple uploads of images.
Posted by Dustin Peterson about 5 years ago
Related articles
Hi,
This is what I'd like to achieve:
we have a list of employees (module x)
per employee I select a few services (a related field calling data from module y)
Now, in the detail view of a service (module y), I would like to automatically have the employees (module x) visible from where I called this specific service.
Naturally I can set up a related field again and select the desired services... but this seems to me like double work.
Is this possible? Somehow...
Posted by Keston about 5 years ago
Multi checkbox values in template
How can I get all values of a multi checkbox field in the details.hbs template?
I tried {{#each FieldName}}{{value}} {{/each}} but that doesn't work.
Thanks!
Posted by Keston about 5 years ago
Classified, Catalogue, Properties: Out of Frame
Hello,
When add Classified, Catalogue or Properties to a page, they render out of frame and stack the content, rather than showing as they do in the demos. Here's a screenshot of what is happening:
http://napha.org/Portals/0/200%20Site%20Images/delete.jpg
Any advice is much appreciated.
Thanks!
Posted by Mike Costello over 5 years ago
CKEditor ability to have Classes
It doesn't seem any of the editors will retain a class added to an html element. I have tried to do allowedextracontent but don't see any way to configure it to allow this. It will keep them when you first save, but if you go back to edit content, they are all removed.
Posted by Dustin over 5 years ago
Filter settings not working using category template
Hi,
On a specific page I have the OpenContent module active with the template Categories selected. But when I edit the filter settings to show only a specific category, this does not work.... I still see all the categories.
Is there a way to achieve this?
Posted by Keston over 5 years ago