问题标签 [kentico-mvc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
889 浏览

asp.net-mvc - 如何在没有页面构建器的情况下在 Kentico 12 中使用 BizForms

Kentico 12 仅支持使用开箱即用的“表单”页面构建器小部件的表单。

谁能提供如何在 MVC _Layout.cshtml 或不使用页面构建器的页面中使用 BizForms 的示例?

验收标准:

  • 必须允许 CMS 用户编辑表单并将更改反映在网站上
  • 必须允许开发人员在保存到 Kentico 之前和发送通知/自动回复之前操作/转换提交的数据
  • 必须正确呈现表单构建器中使用的自定义 FormSections 和自定义 FormComponents
0 投票
1 回答
191 浏览

kentico - Kentico 12 MVC - 自定义 BizForm 响应

我需要在 Kentico 中定义一个表单,一旦提交,它将在同一页面内显示一个 youtube 视频(无重定向)。这将类似于“显示文本”。有没有办法覆盖现有的响应?

0 投票
1 回答
164 浏览

kentico-mvc - 通过代码提交表单项不会触发电子邮件通知

我正在尝试通过我的 MVC Web 应用程序上的 api 提交一个新的表单项(从表单的代码选项卡中获取代码),但电子邮件通知不起作用。除了电子邮件警报之外,它确实创建了一条新记录。我检查了电子邮件队列,但没有表单项的记录。我正确配置了 smtp 服务器设置。我也检查了事件日志,但没有看到任何错误。我是否遗漏了什么或此功能仅在门户引擎上?

在此处输入图像描述

0 投票
0 回答
699 浏览

autofac - 在 builder.RegisterType 中找不到使用“Autofac.Core.Activators.Reflection.DefaultConstructorFinder”的构造函数

详细错误如下

无法使用可用服务和参数调用类型为“KMVC12.Controllers.HomeController”的“Autofac.Core.Activators.Reflection.DefaultConstructorFinder”的构造函数:无法解析构造函数的参数“KMVC12.Repositories.IPromotedContentRepository repository”无效.ctor(KMVC12.Repositories.IPromotedContentRepository,KMVC12.Repositories.IHomeRepository,KMVC12.Infrastructure.IOutputCacheDependencies)'。

已删除 builder.RegisterType 中的 set .PreserveExistingDefaults() ,这是我在一个解决方案中找到的

我在 DependencyResolverConfig.cs 文件中有以下代码,这是导致错误的原因吗?

由于上述异常无法运行首页需要在前端无异常运行。

0 投票
1 回答
228 浏览

text-editor - Text editor links leading with ~ character and images are not rendering correctly

I am running Kentico 12.0.24 MVC and there is an issue how the inserted images render using the text editor.

When inserting images using the Text editor in Kentico CMS, I am able to see the inserted images inside the Text Editor, but when viewing on the front-end page the images do not render and this is due to how the image path is generated with a leading ~ (tilde) character.

The generated image path is relative, which is fine but is the leading tile that breaks it.

Here are the steps to reproduce this:
1. In Kentico CMS, go to a page that has a Rich text editor (WYSIWYG).
2. In the text editor, click on the button called "Insert/Edit image or media".
3. In the popup window, click on the tab called "Media Libraries".
4. From the list, I select an image. At this point, the URL image URL preview will be as follow "/Admin/IPGLaserSystems/media/Random/application-non-contact-1x.jpg".
5. I click on "Save & Close", I am able to see the image inserted in the text editor.
6. Click "Save" at the top.
7. I navigate to the page and the image goes not show and at this point the generated image path is as follow "~/IPGLaserSystems/media/Random/application-non-contact-1x.jpg".

If the tilde character is removed from the path, then it renders the image fine. This should work natively.

I also found the following article, that seems to address the insertion of links from text-editor in relative form, but doesn't seems to directly address the issue with using relative (tilde-based) links in general: https://devnet.kentico.com/articles/how-to-fix-links-inserted-via-a-wysiwig-editor-in-kentico-12

Please advise, thank you.

0 投票
1 回答
254 浏览

multilingual - 如何一次性在 Kentico 中为多个页面创建新的文化版本?

我正在现有的 Kentico 12 网站上配置新的语言版本。我可以通过从现有语言复制内容轻松地创建页面的新文化版本,但问题是此功能仅在页面级别可用,在我的情况下,有数百个页面,将导致数小时手动的努力。理想情况下,我想选择多个页面并一次为所有页面创建新的文化版本。

你能告诉我如何优化这个任务吗?

0 投票
0 回答
93 浏览

kentico - 启用文化时的奇怪 URL

我正在运行 Kentico 12.0.26 MVC。

通过内联小部件编辑器 (MediumEditor) 添加链接时,生成的最终 URL 有一个奇怪的 URL 路径,这对于 SEO 来说不是一个漂亮的 URL。

并非所有链接都有这个,但是当添加这个链接时,它使用页面的干净相对 URL,我想也许在启用 Kentico 文化功能之后,他们以某种方式得到了这样的更新,但并非所有链接都受到影响。我仍然不完全确定他们会在什么时候得到这样的更新。

我还注意到通过页面类型编辑器(CKEditor)添加的链接很好,似乎没有遇到这个问题。

请指教,谢谢

0 投票
1 回答
278 浏览

kentico - 在 Kentico 12 MVC 中引用客户端脚本文件

我们是Kentico的新手,最近购买了Kentico 12许可证。

这就是我们正在尝试做的事情:

  1. 在CMS开发部分创建一个新的CSS 样式表JavaScript 文件
  2. 在单个自定义MVC页面上,使用标准 HTML 引用来引用这些客户端资源,例如:

我查看了 Kentico 12 API 文档,我认为我需要对CssLinkHelper.GetStylesheetUrl()CSS 使用辅助方法,但我找不到 JavaScript 的等价物。

任何指导将不胜感激。

0 投票
1 回答
94 浏览

kentico - 如何在每个站点中创建 kentico 站点特定的资源字符串?

在我的站点中,他们配置了 5 个站点。站点名称:A、B、C、D、E。

我希望能够使用每个文本字段的站点特定资源(本地化)字符串按站点自定义这两个文本。

这些资源字符串应该可以由 Kentico 上的管理员进行配置,并且应该能够由每个站点进行配置。

Kentico 中这些字符串的当前名称分别是标题和描述的“A.Checkout.EmailTitle”和“A.Checkout.EmailDescription”。

我使用下面的代码:

公共字符串GetPerSiteResourceString(字符串名称,字符串站点=“”)

标题 = resources.GetPerSiteResourceString("Kadena.Checkout.EmailTitle"),描述 = resources.GetPerSiteResourceString("Kadena.Checkout.EmailDescription")

0 投票
1 回答
51 浏览

kentico-12 - Kentico 12 Service Pack - MVC 站点仅重定向到管理站点登录页面

我有一个在 Kentico 12 MVC 中构建的站点。我刚刚将管理后端应用程序和我的 MVC 应用程序升级到了 Kentico 12 Service Pack(修补程序 12.29)。

现在我的 MVC 应用程序只重定向到管理应用程序登录页面。我从我的应用程序中删除了管理员重定向路由映射,这仍然会发生。该网站在修补程序之前运行良好,现在我什至看不到主页。

由于该站点处于早期开发阶段,因此在应用修补程序之前我没有备份任何内容。尽管如此,从头开始重做事情并非易事。学过的知识。

好吧,这真的很奇怪。我关闭了 IIS 中的管理站点及其应用程序池。仍然获得登录屏幕。管理员登录屏幕来自内部网站

为清楚起见,我有两个站点:mysite.local(MVC 应用程序)和admin-mysite.local(股票 Kentico 实例)。我停止admin-mysite.local了它在 IIS 中的应用程序池。当我访问mysite.local它时,它的外观和行为就像一个 Kentico 管理员实例,并带有管理员登录屏幕。我尝试登录,它的工作方式就像 Kentico 管理网站应该的那样,带我去mysite.local/这太奇怪了。