Discussions

Ask a Question

How to use data from other template

What are the steps to use the data from an existing template in a new template? The idea here is that both templates would continue to use the same data source moving forward. One template would manage data for both templates.

How to Add Categories to Existing Template

How does one add categories to a template that already exists? This template was originally created based on the Bootstrap 3 template. We want to know how to add Categories to this where they can be maintained using the actions menu.

How to Filter by Multiple Values

In the default Classifieds example, we're able to filter the list by the ".title" field. How can we filter by multiple fields? For example, how can we filter by title AND description?

Getting json from another OC module to display in template

We are currently using a Select2 in "OC module A" to get data from "OC module B" (which is a list of items on another tab) and store the id. At the moment all we can do in the handlebars template for "OC module A" is display this id. Is it possible to get the json from "OC module B" using an api call (bearing in mind this is for the display template so needs to be anonymous)

Clarity on fetching data from other OC Modules

I have a hidden page called **Management** and have an OC module (multi items) with a list of client names with some basic attributes. My data looks something like this. ``` [ { "name": "Jane Smith", "gender": "female" }, { "name": "Joe Someone", "gender": "male" }, { "name": "Bob Jones", "gender": "male" } ] ``` On another page named **Clients** I have another OC module with a template that display a bootstrap profile card type layout. In my form builder I have two fields. 1. Client Name (Select2) 2. Position (Text) I understand that you must manually edit the **options.json** file to configure the Select2 properties so they point to the OC module in the **Management** page. I have something list this. ``` { "fields": { "clientName": { "type": "select2", "dataService": { "action": "Lookup", "data": { "moduleId": "692", "tabId": "173", "valuefield": "name", "textfield": "Name" } } }, "positionTitle": { "type": "text" } } } ``` and my **template.hbs** file looks something like this. ``` <ul> {{#each Items}} <li class="gender-{{clientName.gender}}">{{clientName}} - {{positionTitle}}</li> {{/each}} </ul> ``` My question is, how can I grab the **gender** value as well so my html output looks something like ``` <ul> <li class="gender-female">Jane Smith - CEO</li> <li class="gender-male">Joe Someone - Accounts</li> <li class="gender-male">Bob Jones - Marketing</li> </ul> ``` I have tried grouping the clients list into objects like below but still no go. ``` [ { "client": { "name": "Jane Smith", "gender": "female" } }, { "client": { "name": "Joe Someon", "gender": "male" } }, { "client": { "name": "Bob Jones", "gender": "male" } } ] ``` If anyone can point out what I'm doing wrong your help would greatly be appreciated.

Is there a way to remove the "id" from Context.DetailUrl?

I'm using razor templates for a multi items module and everything works great, but the DetailUrl looks like mysite.com/blog/id/8/my-article-slug. Is there an easy way to turn this into mysite.com/blog/my-article-slug ? In the manifest I've specified {{Seo.Slug}} but this still keeps id/<int> in the detail URL. I appreciate any help on this, thanks!

Adding head values to items of multi-item template

I want to be able to have some of my article data be visible in head values, like ogg meta tags. Is there a way to add these meta tags (server side)? For example, in Ventrian News Articles there's a template where you can add meta data, using tokens to fill in the values.

CKeditor - Enhanced Image Plugin

Hi, I would like to have the Enhanced Image Plugin added to the ckeditor. Any idea how? https://ckeditor.com/docs/ckeditor4/latest/examples/image2.html Also for the image output, can we output the full URL?

Field values from other module (SQL table)

Is it possible to use a Relation type field and call an other database table. Would be great to be able to point to product data from a webstore module...

GetTemplate API Returns HTTP 404 Error

Why might this error be occurring? It's DNN Platform 9.4.4 and Open Content 4.3.0 (brand new install). https://www.screencast.com/t/y2XIVYh5W