Discussions

Ask a Question

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...
ANSWERED

Import data

I would like to import article data, is there a way to import?
ANSWERED

Copied site using site template, now wrong urls. Where are they stored?

I made a copy of a site, then created a new site on same server and all worked fine. I then deleted old site and found that OpenContent was referring to files in old site. Looked in all settings and even in the database to find URL references, but could not find them. How can I change the URLs it is looking for. Here's the error: [code]Could not find a part of the path 'e:\web\public_html\Inoui\wwwroot\Portals\1\OpenContent\Templates\Bootstrap3Accordion\template.hbs'.[/code] The new portal is 4 and I would like to change the URLs it is looking for to be 4 instead of 1. Any ideas? Thanks.

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

Handlebar helper Truncate Text?

Has anyone succeeded in using an handlebar helper that converts a full html description into a truncated plain text description? The only thing I could find is the truncate helper: Handlebars.registerHelper ('truncate', function (str, len) { if (str && str.length > len && str.length > 0) { var new_str = str + " "; new_str = str.substr (0, len); new_str = str.substr (0, new_str.lastIndexOf(" ")); new_str = (new_str.length > 0) ? new_str : str.substr (0, len); return new Handlebars.SafeString ( new_str +'...' ); } return str; });

Workflow/content staging for single item templates

The following page states that workflow/content staging is only implemented for multi-item templates: https://opencontent.readme.io/docs/workflow-content-staging Are there any plans to add support for single item templates? If not, are there any recommendations on how one might approach this if they were looking to do it themselves?
ANSWERED

Live Edit is Fantastic....yet

I imagine whomever created this its still a work in progress but wondering if a save option has been figured out yet as well as a warning if a user tries to delete an option and better yet restore a deleted option if it is in fact deleted.

Why would a HTTP 404 occur?

I have a DNN Platform 09.01.01 website where OpenContent 04.02.00 is installed. When I add OC to a page, it never finishes loading. Instead, there are HTTP 404 errors reported for the API endpoints in the console, see below. Is this a bug and/or something you've seen before? What is the fix for this? https://example.com/API/OpenContent/InitAPI/GetTemplateState https://example.com/API/OpenContent/InitAPI/GetTemplates Following those two 404 errors, the following error is reported by OC: "fail is not defined" Here is the line of code reported for that: https://www.screencast.com/t/cmDiUVhx1
ANSWERED

Possible to limit number of items in NON Multi item template

Wonder if you clone a instance if you can have one display only a certain number of items without using the multi item template.
ANSWERED

{{AdditionalData.Intro.Title}} should be {{AdditionalData.intro.Title}}

In the templates there's a token placed, by default, {{AdditionalData.Intro.Title}}. imo that only works if you change this to {{AdditionalData.intro.Title}}.
ANSWERED

"Index": true or "index": true?

In the manifest, almost on top of the document, it reads by default: "Index": true Should that not be "index": true?
ANSWERED

Handlebar token for Portal URL?

Is there a token that can be used in the template for this?

Chained/Nested Helpers Inside {{each}} Don't Work

Is this a bug? I have the following code that works without issue. {{#equal Settings.Setting1 "value1"}} {{#equal Settings.Setting2 "value2"}} <p>I can see this rendered.</p> {{/equal}} {{/equal}} However, the following example will not rended properly. {{#each Items}} {{#equal ../Settings.Setting1 "value1"}} {{#equal ../Settings.Setting2 "value2"}} <p>This does not get rendered.</p> {{/equal}} {{/equal}} {{/each}} I know the values are there and are being called correctly (since the path is off a level due to the {{each}} loop. This works on its own, outputting the expected setting values. {{#each Items}} {{../Settings.Setting1}} {{../Settings.Setting2}} {{/each}} This doesn't even work... {{#each Items}} {{#equal ../Settings.Setting1 "value1"}}{{../Settings.Setting1}}{{/equal}} {{#equal ../Settings.Setting2 "value2"}}{{../Settings.Setting2}}{{/equal}} {{/each}} Oddly enough, this works though... {{#each Items}} {{#equal ../Settings.Setting1 "value1"}}I see this...{{/equal}} {{#equal ../Settings.Setting2 "value2"}}... and this too{{/equal}} {{/each}} In a final related test, this doesn't work. {{#each Items}} {{#equal ../Settings.Setting1 "value1"}} I see this... {{#equal ../Settings.Setting2 "value2"}} ... but not this one!!! {{/equal}} {{/equal}} {{/each}} Does anyone know why this works consistently outside of the {{each}} but not inside of it?

Equal for Multiple Possible Values?

I have a setting in a template that is a select list. In the template itself, I need to check to see if the setting value is one of multiple possibilities. I'm not sure how to do that with Handlebars and searching hasn't yet helped me find what I'm looking for. Here's what I'd like to do in the template, if the syntax supported it. {{#equal Settings.LayoutStyle "bottom-standard" || "bottom-justified" || "bottom-centered"}} <!-- my html content --> {{/equal}}

Error Error using template Bootstrap 3 Carousel

I installed the OpenContent 04.03 module, imported the Bootstrap3Carousel.zip template, but the carousel does not work, it shows the following error: Uncaught TypeError: $(...).carousel is not a function at HTMLDocument.<anonymous> (template.js?cdv=42:3) at fire (jquery.js?cdv=42:1037) at Object.fireWith [as resolveWith] (jquery.js?cdv=42:1148) at Function.ready (jquery.js?cdv=42:433) at HTMLDocument.completed (jquery.js?cdv=42:103)

Improve SEO on multi item templates

I was wondering.. I have some multi item templates in use and noticed something regarding SEO. As an example an articles template. I noticed few things that are not optimal IMO, maybe we can somehow improve on this? When the detail-url does not resolve to an item, the list is rendered So I can have www.mysite.com/Articles/id/10 which resolves to an article but www.mysite.com/Articles/id/11 (which does not exist) shows the list of articles. Wouldn't it be better to generate a 404 when there's an id present and not found? I noticed this when a client added articles, which were indexed by Google and later removed them. Google now complains about duplicate content because there are multiple urls to the same list of articles. www.mysite.com/Articles and www.mysite.com/Articles/id/11 Not sure how one could handle this in combination with the Url REwriter provider..?

DNN Search Index

Hi, I know it is possible to have the data indexed bij DNN Search. Simply by adding this to a template main section in manifest.json: "dnnsearch": true, "dnnSearchTitle": "{{Title}}", "dnnSearchDescription": "{{convertHtmlToText Description}}", "dnnSearchText": "{{Title}} {{convertHtmlToText Description}}", However, I've come to the conclusion that not everything that is showed/added in that template is indexed. For example the intro title and description and some custom additionalData fields. Also, I really would like to be able to choose which module is indexed and which is not. In my recent case I have 2 modules, each filled with hundreds of questions and answers. These faq's I use through-out the website on multiple pages. So, I use a single source to display the content on multiple pages, often filtered by a certain field. This way was mandatory in order to create an orderly and easy way of administer the FAQ's. When I _deselect_ the module Advanced Settings 'Allow Indexing' of the 2 source modules and _select_ this setting in all other modules, I would expect the 2 source modules not indexed and all other modules indexed. Sadly this is not the case. Any advise, tips or examples are welcome!

Troubleshooting: Sequence contains more than one element

What's the best way to troubleshoot the template to figure out how/why this error occurs? `Sequence contains more than one element`