9

Got the answer, here is the complete code. In my case I'm updating the Display Subtitle field but you can change this field or make the field name a variable if you want to: public void SetRenderingParameterValue( Item item) { using (new SecurityDisabler()) { string defaultDeviceId = "{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}"; ...


6

I've not completely test this using Sitecore PowerShell Extensions, but it should get you pretty close. $item = Get-Item -Path "master" -ID "{961563FC-3445-4558-BF3A-06DF06BA6298}" $renderingItemId = "{93F07F46-F356-419A-B937-A5EB2A9D63DD}" $placeholderId = "/content-body/secondary-column-left" # Accepts Hashtable, Ordered Dictionaries, etc. $parameters = [...


5

You are trying to get Datasource from an item which is retrieved using Get-Item. Instead you should get datasource from Item retrived using Get-Rendering Change this code $Properties = @{ RenderingItemName = $renderingItem.Name RenderingItemID = $renderingItem.ID RenderingItemPath = $renderingItem....


3

By mocking a proper return type(GetPreviousProductsResponse) value for the injected service(_productService) instead of a model property(PreviousProducts) solved this issue. _productService.GetPreviousProducts(Arg.Any<GetPreviousProductsParameters>()).Returns(new GetPreviousProductsResponse); The test still doesn't return 'ViewResult' type as intended ...


3

The Container component is not a Variant component, so you can't create variants for it. You have 2 options, the best as has already been mentioned, just add a Style option for the Container component and use that to add the background colors. It's the simplest and easiest to use option for content authors. The 2nd is to clone an existing variant component, ...


3

The manifest API is a JavaScript API; we just provide a default input via YAML. You can modify the handling in /sitecore/definitions/*.sitecore.js to source content from whatever you like, including multiple items in one JS file. Example here, note that the manifest contains TypeScript typings to make constructing objects easier.


3

This is how query strings works. Browser needs to know which part of url is protocol (knows it as url contains // and http or http or ftp before), which part is domain (knows it because of . like .com, .net, ...) and ? is used for query strings so everything which is after this character is considered as query string to pass some parameters towards server. ...


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

For reference we were experiencing the same error and found that it was caused by having a Controller HTTP Post action with the same name as the view (when using SXA). Changing the action name resolved our issue.


2

Find out the name of the placeholder that you are inserting into by hovering the mouse over the "Add here" button. Let's assume it is the 'content' placeholder, go to Content Editor > navigate to content (/sitecore/layout/Placeholder Settings/content), Go to the "Data" section, "Allowed Controls", click Edit and then add the desired rendering (or all of ...


2

By default Sitecore does not do such a thing. You still need JavaScript to reload the Article in the other component. On the like button click event you can search for other Articles on the page which has the same ID as the liked Article and then do an AJAX call to the rendering which needs to be updated. So you will have 2 actions in the Controller (if you ...


2

Post analysis and confirming that there is nothing wrong at the code/project side, we decided to raise a Sitecore Support ticket for the this experience. Later on the support team identified it as a BUG in Sitecore. This weird experience was due to an issue with improper parsing and double quotes, which was registered as a bug in their bug tracking system. ...


2

A few things to consider when approaching this: Where are the geo coordinates stored? Are the items in the content tree or somewhere else? Does the bulleted list on the left match the items on the map? Does the static map share the same API key used in the global map provider setting? TIHIDI: Items used to source the list and map inherit from the SXA POI ...


2

Adding also an answer based on the comment that the field should be changed from DropList to DropLink. This is because DropList is storing the item names so the TargetItem value will be null, whereas DropLink is storing the Targeted Item's Guid and sitecore will retrieve the linked item. You can verify the values aswell if checking the sitecore menu View -&...


2

One possible approach is to use a Promo component. There are several benefits to cloning the component but that requires discussion beyond the scope of this answer. In the example image provided you would need these fields: Image Title - single line text Text - rich text Link - one more general links Next create a rendering variant like the following: The ...


2

This issue is not related to the upgrade directly, though it might be classified as a side effect. There is no any "main" placeholder in the provided Layout: @Html.Sitecore().Placeholder("main") The easiest way is to add the "main" placeholder definition just below the "main-content" one to your Layout.


1

If the only difference is the background color I would say follow this guide to handle the styling difference with a checkbox in the properties of a rendering: Add a style for a rendering Scriban could be useful if you want to be able to edit the markup from the Content Editor. For this particular application I don't think it would be of particular help or ...


1

If it's purely presentational Dawid's answer in your link works perfect. However, if you want to display other fields for example you might be able to work with the Rules engine: Each individual field, section, Scriban etc. under the Variant Definition item has that field and can be utilized to make sure that does/doesn't render out depending on whether the ...


1

I think you might already have checked these though, but if not this would be helpful: Did you add the renderings in the Allowed Controls? If not, you should add the renderings in the Allowed Controls of that placeholder present in the Placeholder settings. Screenshot below for reference.: Check the "Editable" checkbox is checked for the ...


1

Welcome to Sitecore community. Url rendering is explained here . Url Rendering This rendering type renders the response of a HTTP GET request onto the current page. You can use it if you need to screen scrape HTML from another system. Can sometimes be used to avoid using iframes. In Genreal, if you need to display any website in iframe in ...


1

Having contacted Sitecore support it seems that there is a bug when creating an SXA 1.8 instance on Azure, it does not include all of the necessary items for the Master database. The workaround to this problem is to install Sitecore 9.1 and then to manually install Powershell 4.7.2 (or 5.0) and SXA 1.8 To track the future status of this bug report, please ...


1

Please take the bellow approach as this is working quite fine for me (I've just checked it). I have a couple of pages which I've tagged with three tags: Modify your Search Results rendering variant and add Variant Reference item and use SxaTags field to pass through: Under Variant Reference drop a variant field which will display Title of a tag item: Here ...


1

Based on the wording of using "Sitecore instance" I think you have decentralized your authoring? One architectural approach would be to use a centralized authoring pool that manages all the content as multiple sites and then have your separate CD's with separate publishing targets so that you can maintain your end-user performance. In this way, you could ...


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