FAQs >
Web parts & Controls
Regrettably, this is a .NET bug. Please see this
forum thread.
You can find the solution there.
If you use BizForm as an inline control, you can adjust its code-behind:
~\CMSModules\Bizforms\InlineControls\BizFormControl.ascx.cs by amending the
SetupControl() method. You will set the BizForm property
UseColonBehindLabel to false like this (be aware of this change in case of future upgrade):
this.Bizform1.UseColonBehindLabel = false;
On the other hand, in case you use it as a webpart, there is an easy solution for that. Please locate to webpart properties (on the Design tab) where you can see the
'Use colon (:) in labels' property. You need to set it to false.
-ov-
There are two possible reasons of this issue. First one is browser based and it is described in
this FAQ.
Second one could be caused by the fact, that the
‘Selected item transformation’ property of the Lightbox webpart is not set. In this case, there needs to be the image tag rendered when seeing selected items. For instance you can use our predefined
‘CMS.File.LightboxSelected’ transformation which contains code as follows:
<img src="<%# GetFileUrl("FileAttachment") %>" title="<%# Eval("FileName") %>" alt="" />
This transformation is intended for
CMS.File document type based documents, so if you store files any other way, you will need to adjust it as per your needs.
Links to other resources:
Writing transformations
Lightbox properties
-ov-
We’ll see an example of
Submit button element of the
Logon form webpart. You can add your custom CSS class to the Logon input button following way:
1) Please open Logon form webpart properties. At the top of opened window there two tabs, right one is
Layout. Please switch to this one.
2) You will need to create new layout, in order to be able to edit it.
3) Once you use your custom layout you can add CssClass property to the button control, so that it can finally look like this:
<cms:LocalizedButton CssClass="LogonButton" ID="LoginButton" runat="server" CommandName="Login" ValidationGroup="Login1" EnableViewState="false" />
This will enforce adding CSS class to the input element which represents your button. Basically, you can change/add the CSS classes of other inputs (textboxes) the same way. Please note, this procedure is applicable also for other similar form webparts like Change password, Sign out button, etc.
-ov-
It is possible that you have changed the settings of
Content subscription web part. Please note that these changes are not applied for current subscriptions but only for new ones.
It would help if you re-new all subscriptions – delete them and create once again. You may delete them on
Administration -> Users -> edit -> Notifications tab.
There is a feature in 5.0 version that if you are a Global administrator you may log on as edited user (Administration -> Users -> edit -> General) so you may re-create his/her content subscriptions.
Documentation for Content changes notifications
Regrettably, field “Tag Selector” of type doesn't support auto completing. Please use following procedure instead:
Please create new field for Tags using 'New system attribute' button and then choosing 'Document attributes' as 'Group' and 'DocmentTags' as 'Attribute name'. You can inspire by 'DocumentTags' field of CMS.BlogPost document type.
Please make sure you have 'Read' permission for newsletters module set for 'Everyone' in 'CMSDesk -> Administration -> Permission matrix' section.
If you use version 4.0 you will also need to correct typing error in web.config file. We are very sorry for this inconvenience. Could you please change following line in ~\CMSModules\web.config file from:
<location path="Newsletter/CMSPages/GetNewsletterIssue.aspx">
to:
<location path="Newsletters/CMSPages/GetNewsletterIssue.aspx">
You will need to change following lines in the same way as well:
<location path="Newsletter/CMSPages/GetCSS.aspx">
<location path="Newsletter/CMSPages/Unsubscribe.aspx">
If you check those properties (set them to true in ASPX templates) it may seems that links to previous/next and first/last items don’t appear on the page even though you would expect them to show up in the pager.
Actually it could be correct behavior, however one must admit it's a little bit confusing. Documentation says this: If checked, first and last buttons of the pager will be displayed only where usable. When you set DisplayFirstLastAutomatically to true it means that first/last links will be displayed only if there is no other possibility to reach the (first/last) page. It could be in the situations when you have set e.g. GroupSize to particular number and there is still page in another group of results.
The same applies to DisplayPreviousNextAutomatically likewise.
You can use following example code to change property of web part (breadcrumbs) on some page template (cms.blog):
// get PageTemplateInfo according to PageTemplateCodeName
PageTemplateInfo pti = PageTemplateInfoProvider.GetPageTemplateInfo("CMS.Blog");
// get WebPartInstance according to WebPartID
WebPartInstance webPart = newInfo.GetWebPart("breadcrumbs");
// set web part property
if (webPart != null)
{
webPart.SetValue("Path", "/%");
}
// save changes to page template
CMS.PortalEngine.PageTemplateInfoProvider.SetPageTemplateInfo(newInfo);
When you’d like to display webpart within one page template only on specific document, it’s possible to take advantage of ‘
Edit Value’ button in webpart properties. You can add following macro expression for ‘
Visibility’ property:
{%cmscontext.currentdocument.documentname|(equals)Home%}
Please note, you can place whatever document name instead of "Home". This will enforce that webpart will be shown on document with that name. You can find more about macros in our
Developer's guide.
You need to set IsLiveSite property of CMSHtmlEditor control to 'true':
<cms:CMSHtmlEditor ID="htmlTemplateBody" IsLiveSite="true" runat="server" ToolbarSet="Default">
</cms:CMSHtmlEditor>
Without this setting 'QuicklyInsertImage' button is displayed only if you are logged in.
You can use following sample code:
<%# Eval("ClassName") %>
This feature is not natively supported in Kentico CMS version 4.1, but you can try to ensure this functionality using following workaround:
First of all, you need to create all of the necessary BizForm fields with allow empty value property checked. Then you need to create as many alternative forms (please see
http://www.kentico.com/docs/devguide/alternative_forms_module_overview.htm and related topics in the same section for more details) for your BizForm as the number of pages you require. Each alternative form will be configured to show only fields you require to be displayed on that alternative form - page. Then you would need to modify e.g. ~\40\CMSWebParts\BizForms\bizform.ascx file and add some for example "next" button to this web part. The aim of this “next” button will be to change Alternative form (viewBiz.AlternativeFormFullName) and also to save the BizForm data (viewBiz.BasicForm.SaveData(string redirect_to_URL)). After first page is saved, Bizform entry is created and you need then just to update existing one using BizForm API:
http://www.kentico.com/docs/devguide/bizforms_api.htm
There must be transformations for pager specified as there is
Universal Pager used within this web part. You need to create transformations and then specify their name into properties with following names:
PagesTemplate
CurrentPageTemplate
SeparatorTemplate
FirstPageTemplate
LastPageTemplate
PreviousPageTemplate
NextPageTemplate
PreviousGroupTemplate
NextGroupTemplate
LayoutTemplate
You may optionally see sample transformations in this web part's configuration section at ~/Examples/Webparts/Full-text-search/Smart-search-dialog-with-results.aspx page in sample CorporateSite (the one based on Portal Engine).
You may insert the query to any document type, e.g. Root document type in:
Site manager -> Development -> Document types -> edit Root -> Queries -> New query
Then write this expression to Query name property of web part:
CMS.Root.<query name>
The reason of this behavior is an interference of JavaScript Frameworks, used by Scroling News web part and Lightbox web part. Scrolling news (and Content slider) web part is using a MooTools framework and Lightbox is using a Prototype framework. There is a problem with method with the same name in both frameworks. In current version (4.1) the only solution is to not using these 2 web parts on the same page template.
This issue may happen after upgrade, when you use custom layout in properties of web part and it doesn't correspond with the source code of new version of web part. Please create new layout from new version of web part to solve the issue.
You can write appropriate HTML code for lightbox directly into the transformation or e.g. static text or editable text web part. Please see example directly at
Lightbox site. Please note that the javascript libraries from ~\CMSWebParts\Viewers\lightbox_files folder are not original files - they are modified to work with the web part so it's not recommend using them for custom code. Could you please put original javascript libraries for lightbox e.g. into ~\CMSScripts folder and reference them instead of libraries from ~\CMSWebParts\Viewers\lightbox_files folder?
This error seems to occur randomly on larger files. The error is caused because the lightbox web part is trying to display an image “too fast” and the size of the image is not known at the given time. By increasing the “Load delay:” has the web part "more time" to gather the values. To fix this behavior increase this property value (250 by default) to 500 or higher in the properties of the lightbox web part.
Actually there is a possibility to create folder for each user automatically while uploading file. It will be created regarding appropriate macro expression specified as follows.
Please follow steps below:
1. Please go to 'Media Gallery' webpart properties. Here you need to set 'Path' property using following macro: {%cmscontext.currentuser.fullname%}. Please note that if you click on 'Edit value' icon you can utilize the macro creator and use different user attribute to name the folder.
2. You might set 'Allow upload' to enable uploading within this webpart.
It will enforce that authenticated users will upload files to their independent folder within the media library.
Moreover it's also possible to set 'Destination Path' for 'Media File Uploader' webpart to work that way.
Please find this file: ~\CMSModules\MessageBoards\Controls\MessageBoard.ascx.cs. You need to edit line about 443 setting ORDER BY condition for datasource:
this.rptBoardMessages.DataSource = BoardMessageInfoProvider.GetMessages(where, "MessageInserted DESC");
You can modify the transformation so it generates also link and not only preview image. The link could point to some document with Media Gallery web part and could contain LibraryName as query string parameter.
For example:
~/GalleryDetail.aspx?libname=<%# Eval("LibraryName") %>
The Media Gallery web part would get the Library name and use it. You can use following macro in Library name attribute of Media Gallery web part: {?libname?}
At first you need to place Media files data source webpart to the page where you want to use Media Gallery - File List. Then you will just use its ID in the File List webpart.
Now if you want to show only certain folder you may need define Where Condition property of Datasource webpart, for example:
FilePath LIKE N'folder/%' AND FilePath NOT LIKE N'folder/%_/%'
Please note 'folder' is folder which is under current media library. This will show files from 'folder' path and not other else.
Google maps key works only for one domain and you may have a problem with Google maps web part if you run your site on multiple domains.
In this case, please use this expression in the Google maps key property:
domain1.com=key1;domain2.co.uk=key2;domain3.org=key3
By default, Content Before and Content After web part properties are not defined in CMS Site Manager -> Development -> Web parts -> edit your web part -> Properties section and therefore you are not able to specify default value of these properties. However, if you simply add new web part property with Attribute name = ContentBefore or ContentAfter, you will be able to specify default value for these properties.
You can ensure this by changing value for font-family attribute in following declaration in ~\CMSAdminControls\FCKeditor\skins\default\fck_editor.css file:
.SourceField
{
padding: 5px;
margin: 0px;
font-family: Monospace;
}
You may need to clear browser's cache for change to take effect.
You can enable requirement of e-mail filling for Forum posts in CMSDesk -> Tools -> Forums -> …please edit some Forum group or even single Forum in some group.
Then on "General" tab, check the "Require e-mail address" setting.
Please go to: 'CMS Desk -> Content -> document_with_LogonMiniform -> Design' and click on webpart configuration. Here you can select which role you want to show the logon form to. Please select only Not authenticated users role.
This will enforce that logon form will be shown only to non-authenticated users.
Please open ~/CMSAdminControls/FCKeditor/editor/js/fckeditorcode_gecko.js file and find and change following string:
G='<br type="_moz">';
to:
G='';
Unfortunately, this seems to be a bug in the Kentico CMS version 4.0. We are very sorry for this inconvenience. We will fix it in the nearest version.
In a meantime you can solve the issue by adding following lines into SetupControl() method in ~\WebParts\Viewers\randomdocument.ascx.cs file:
this.repElem.CacheMinutes = this.CacheMinutes;
this.repElem.CacheItemName = this.CacheItemName;
If you are using BizForm as a web part in Portal engine templates, you can cofigure the web part by setting the property "Use colon (:) in labels:" to false.
In ASPX templates you can add property to you your BizForm web part <uc1:BizForm ... UseColonBehindLabel="false" />
If you are using Inline control, you can add the property directly to the inline control file /CMSInlineControls/BizFormControl.ascx (in v3.1a).