A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.
9

I suggest you use a SearchDataSource and then bind it to your ListControl. Check this post for binding example: https://visionsincode.wordpress.com/2016/10/17/put-json-data-in-your-searchdatasource-and-bind-it-to-searchabledroplist-sitecore-speak/ Now, in your code, if you do this (jsondata.Communications needs to be an array): providerHelper.getData( ...


7

An alternative to @Gatogordo's option is to use a modular approach to JavaScript using something like requirejs. I wrote a post about using requirejs to organize your js with Sitecore a while a go. The basics are: Setup RequireJS Setup require, this uses a pretty standard require config. The main.js can be: require.config({ baseUrl: "/assets/js", ...


6

It's worth mentioning that the route in the question is called out in a setting. The comment above Mvc.IllegalRoutes explains itself a bit. <!-- MVC: Pipe separated list of route URL's that are not valid for use with Sitecore.Mvc. For instance, the default ASP.NET route ({controller}/{action}/{id}) catches most requests that are ...


5

You would have to perform request to the server to check whether your current template meet certain criteria. Request class: using Sitecore.ExperienceEditor.Speak.Server.Contexts; using Sitecore.ExperienceEditor.Speak.Server.Requests; using Sitecore.ExperienceEditor.Speak.Server.Responses; namespace Sitecore.Modules.ExperienceEditor { public class ...


5

For non-rendered fields, or things that are handled via javascript, etc, I use a combination of Edit Frames and EE views. The EE Views let you present the content in a way that can expose content and fields that might not otherwise be easily accessible and Edit frames let you edit fields that aren't rendered or have complex types.


5

The video component is handled by mediaelement.js, you'll need to edit the JavaScript file for this service in order to fix this issue. If you go to /sitecore/media library/Base Themes/Core Libraries/scripts/mediaelement-and-player and scroll down to the "media" section, download the mediaelement-and-player.jsmediaelement-and-player.js file there. Copy ...


5

Sitecore supports client-side event logging using JSNLog. Sitecore client logging uses JSNLog which has been wrapped to allow Sitecore to configure it via a patch and to make use of the existing Log4net logging. There is an OOTB configuration file called Sitecore.JSNLog.config on app_config/include/Sitecore. To enable client-side logging you need to add ...


4

Simon, I found an answer. There is an FXM variant of $(document).ready (more details here) So solution is to customize SearchBoxView and substitute existed inline js code with FXM-aware js code: <script type="text/javascript"> if (typeof (SCBeacon) != 'undefined' && SCBeacon && SCBeacon.push) { // Sitecore FXM ...


4

I think you will find your answer in this blog from Jonathan Robbins. It is quite some code - too much to copy here. An overview of what is all in his example: SubPageCode rendering The Border rendering adds a Placeholder for the other renderings. The MessageBar is used to display messages AdvancedExpander datasources the SampleOrdersAccordion Item we ...


4

EDIT: Update based on comments If you check the definition of LogoutArgs used in the processor, there is a property called RedirectUrl that is of type: Sitecore.Text.UrlString - if you set this property in your processor, that should then be processed by the JavaScript section: $.ajax(ajaxSettings).done(function (data) { window.location = JSON.parse(data)...


4

First off, @PatrickBarron is absolutely correct about your route. However, there is one other issue that I see. Have you tried dropping the word "Controller" off the name of your controller when making the request? By default, the word Controller will be appended for you. In other words, you are currently requesting this URL: "Website/Controllers/...


4

In a distributed environment, you must enable the following two configuration files on all the servers: Sitecore.FXM.Bundle.config Sitecore.FXM.config Also, make sure that the following configuration files are enabled on your content management servers: Sitecore.FXM.Speak.config Search configs (lucene files or solr files) In addition, on each content ...


3

I would recommend creating a custom route for Ajax functionality that doesn't reside in the Sitecore Shell. From my understanding, using the default route of /api/Sitecore only works if you are logged in, which is why it works in preview but not the rest of the time on your site. Now I'm sure there is a way to change this permission, but you wouldn't want ...


3

You can add some javascript on your webpage to listen on your submit button and show a loader icon. To have some handles, you can add custom css classes on your submit buttons. This can be done, either by adding them by the contenteditor. Or you could also edit the Website\Views\FormBuilder\FieldTemplates\button.cshtml file to make it hardcoded. $("....


3

This might be an opinion based question.. but I'll give the approach I usually take. In general I would keep all css and javascript bundled and minified together. This means visitors will load some extra (and maybe unneeded) bytes at the first request, but each following request can use the cached version as it will be the same for all pages. Why this ...


3

with in Sitecore.ExperienceEditor.Speak.Server.RequestArgs class the method name to execute defaults to Process. Check the last line in below method. public RequestArgs(string commandPath, NameValueCollection queryString, string data) { Assert.ArgumentNotNull(queryString, "queryString"); this.QueryString = queryString; this.Data = data; string[...


3

It does not exist now. For that you would need an web API which also contains some backend validation to not blow up your user database. In backend you can easily create users using Sitecore API. At some point maybe they will have such a function in JSS. I can imagine this function as part of Sitecore Forms support by JSS in the future.


2

There is a helper method @Html.RawJsEncodedString in my post that you need to use here. You need to wrap you @Html.Sitecore().Field("Title") in that method so that it will encode quotes and correctly output it via ng directive.


2

This seem to be not a bug in SXA Could check whether you can download some media item (js/css) from media library and see how it behave? I can see server response with error appended to a file after I download it on a disk. I reported such issue some time ago (November 2016) and it was an issue of Sitecore. Unfortunately, the support page with this fix ...


2

We were able to track down the issue. It had to do with a pipeline patch in the mvc.getRenderer pipeline--we were patching in before "Sitecore.Mvc.Pipelines.Response.GetRenderer.GetViewRenderer, Sitecore.Mvc". Removing our patch config file resolved the issue.


2

There are some ideas here that you might be able to use Steve: Dealing with jQuery version collisions in WFFM e.g unloading jquery after testing it: if (typeof jQuery != 'undefined' && jQuery.fn.jquery == "1.4.2") { jQuery.noConflict(true); } Or the answer I posted on the above link about using HTML Agility Pack, loading in the DOM, removing ...


2

Sitecore Habitat solution might have what you are looking for. Pipeline: For each rendering you specify a js/css asset or a line of script. In the mvc.getPageRendering pipeline it gathers up all the necessary js/cs for all the renderings on the page. https://github.com/Sitecore/Habitat/blob/master/src/Foundation/Assets/code/Pipelines/GetPageRendering/...


2

You're rendering the HTML markup directly in your cshtml file, but you need to use the Html Helpers. I suggest you take a look at the default Checkbox field markup located in /Website/Views/Form/EditorTemplates/CheckboxField.cshtml, your markup is almost exactly the same as the default view: @using Sitecore.WFFM.Abstractions.Data.Enums @using Sitecore.Forms....


2

Starting form SXA 1.7 we've added an option to extend the component's script and we are using it also in the SXA to change the behaviour of few components in the Edit mode. You can create new Theme which will be extending our scripts or include those scripts in your current theme. Here is how this is done in SXA. Navigate to /sitecore/media library/Base ...


2

As there are many ways to solve this issue, I ended up using a combo of modifying my controller code and pulling in the view through an ajax call. Here's the final solution. Controller [HttpGet] public ActionResult MethodName() { ...controller code goes here... return PartialView("/path/to/partialView.cshtml", obj); } Jquery $...


2

This doesn't map 100% to what you want, but I normally wrap this in a WebApi controller and within that, call this code which renders HTML from a View Rendering: using System; using System.IO; using System.Web; using System.Web.Mvc; using Sitecore.Data.Items; using Sitecore.Mvc.Common; using Sitecore.Mvc.Controllers; using Sitecore.Mvc.Pipelines; using ...


2

JavaScript equivalent of ISO date format used in Sitecore is 2017-04-01T07:30:00Z. You first need to convert from 20170401T073000Z to 2017-04-01T07:30:00Z and then create new Date object: var dateString = "20170401T073000Z"; // change string to "2017-04-01T07:30:00Z"; var formattedDateString = dateString.substr(0, 4) + "-" + dateString.substr(4, 2) ...


1

Short answer: Yes, it can be done via mvc.getPageRendering with some additional processors. But where is the code? It's from Habitat at github The detail is: Habitat has implemented this requirement, you can take a view of Assets module in Foundation layer Configure Pipeline's processors They added a couple of additional processors into mvc....


1

You need to set the FXM.Hostname setting to a hostname that is handled by your CD server. Use a config patch like this: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <settings> <setting name="FXM.Hostname"> <patch:attribute name="value">mydomain.com</patch:attribute> ...


1

I know this is old but I faced a similar issue with slick and experience editor. Slick by default will assume that all direct children of the carousel div should be slides and since EE injects its own code tags that cause issues. There is an option you can set to limit the children of the carousel with a selector called 'slide'. Try to set it and test ...


Only top voted, non community-wiki answers of a minimum length are eligible