9
votes
How to Render Javascript per page or component?
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.
...
9
votes
Accepted
Example of populating list in experience profile page with JSON data
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-...
7
votes
Sitecore 9.1 Experience editor throwing JS errors
For us, the problem was an Html.Glass().Editable(...) inside the href of a link. That did not break the Experience Editor in Sitecore 8.1.
The init method of Sitecore.PageModes.ChromeManager throws ...
6
votes
Accepted
Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?
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 ...
6
votes
Accepted
Video component YouTube elements are not clickable
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/...
6
votes
Is there a way to write to the Sitecore logs via Javascript? (8.2)
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 ...
5
votes
Accepted
How do I construct a reasonable JS implementation of canExecute() for an Experience Editor Button?
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....
5
votes
Is it possible to edit fields in the Page Editor that are shown on hover?
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 ...
4
votes
Why is my Ajax url not recognizing my sitecore controller or hitting my breakpoint in my sitecore controller?
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 ...
4
votes
Example of populating list in experience profile page with JSON data
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 ...
4
votes
How to Render Javascript per page or component?
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 ...
4
votes
Accepted
Add custom redirect on SPEAK logout
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 ...
4
votes
Accepted
Sitecore FXM with Coveo, dynamic html does not seem to render
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:
&...
4
votes
Whats is the correct way to implement FXM generated script
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 ...
4
votes
How to show a loading image mean while a submit form is being executed in Sitecore 9 Forms
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, ...
4
votes
Create new user with JSS
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 ...
3
votes
Accepted
A serious error occurred please contact the administrator
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, ...
3
votes
Why is my Ajax url found when I test in preview mode, but not when I bring up the page in a url I get not found errors
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 ...
3
votes
How to Render Javascript per page or component?
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 ...
3
votes
jQuery not working properly with Experience Editor
At least you can use the same version of jQuery as it used in Sitecore version, usually /sitecore/shell/Controls/Lib/jQuery/jquery-1.6.4.min.js is used almost for all versions of Sitecore for ...
3
votes
Sitecore 9.1 Experience editor throwing JS errors
I encountered this error when a rendering's Data Source item had a Rich Text field with an unexpected block of Experience Editor markup saved within it. Removing the <span> corrected the issue.
...
3
votes
Accepted
Trigger Google Analytics Events on Sitecore WFFM form submission
The success behavior for a WFFM form offers two options: rendering a success message on the same form page (replacing the form) or redirecting the user to a success page. It would be very hard to ...
2
votes
Accepted
Angular JS directive with MVC integration Experience Editor errors
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 ...
2
votes
JS scripts optimization results in syntax error
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 ...
2
votes
Undefined error when clicking Publish in Experience Editor
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, ...
2
votes
Sitecore jQuery version compatibility
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' && ...
2
votes
Sitecore Experience Editor not working with ".slick" command
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 ...
2
votes
Whats is the correct way to implement FXM generated script
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/">
<...
2
votes
Accepted
How to extend SXA components scripts?
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 ...
2
votes
Accepted
loading partial view from jquery
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]
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
javascript × 63experience-editor × 10
sxa × 9
sitecore-forms × 7
sitecore-api × 5
sitecore-client × 4
jss × 4
mvc × 4
speak × 4
pipelines × 3
fxm × 3
css × 3
ajax × 3
wffm × 2
media-library × 2
presentation × 2
validation × 2
links × 2
user-management × 2
webapi × 2
xdb × 1
sitecore-commerce × 1
content-editor × 1
configuration × 1
security × 1