How to put products from different content slots* in one carousel - salesforce

I faced with interesting situation.
When we need to put some products into carousel from content slot - we just open a selected template in this content slot (https://prnt.sc/rgcp9f) and get products from slotcontent <isloop items="${slotcontent.content}....
But what we have to do when we need to show products from two different content slots in one carousel ?
The first content slot has content type recommendation
and second has content type product.
So which ways exist to combine these products from different templates in one carousel?
Thanks in advance!

Alex,
I think the best thing to do with this is to build a new rendering template that just outputs the product tiles. Assign that to both of the slot configurations. Then, you can wrap both isslot tags in the parent template with the container tags you need for the carousel.
I hope this helps,
Steve

Related

How can you attach a content item as an element field of another content item via its authoring template?

Let's say I defined a IBM WCM authoring template called "AT-Image"; it creates content item "CT-Image" that contains elements such as an Image of type "Image", Description of type "Short Text", Keywords of type "Text", and other fields that serve as meta for that image resource.
Now, I need to create a content item called "CT-Article" based off from its "AT-Article" authoring template. Let's say that "Article" item has 3 elements: Title, Summary, and Image. Title and Summary are of type "Short Text". But Image needs to be of type "CT-Image" and not Image or Image component.
Is this possible Out-of-the-Box or is this something I need to implement myself via WCM API?
From my point of view you should use a menu component in the following way:
Let's assume you have got your CT-Image and CT-Article in a common sitearea called "MyArticle" like this:
MyArticle
CT-Article
CT-Image
Furthermore you need a WCM Menu component which uses two selection criteria:
current sitearea as location
CT-Image as authoring template
So then rendering CT-Article with a presentation template PT-Article you can reference the menu component. Therefore, you reference the menu component in the presentation template markup. The menu component then will pick up the CT-Image and render it as it is located in the same sitearea as your CT-Article.
That's rather a content design approach then a technical approach. It's all there out-of-the-box and saves custom development effort.
If I understand correctly, basically you want to create pre-defined images and then pick one of them to display when you create an article. Correct?
Well, the easiest way would be to utilize what WCM already gives you: create an Image Component. You will be able to upload the image and also provide a description, but you won't be able to set keywords or metadata. The workaround for this would be to set the keywords/metadata as part of the article. If that is okay, this would probably be the best way to do it.
By doing that, all you would have to do is select the relevant Image Component from your Image Element in AT-Article.
If you really need the images to be their own content items (rather than components) so that they have their own keywords and other information, then the next "easiest" way is probably to use an HTML Element inside AT-Article. In this HTML Element you will have to use the "Insert Tag" option, and then choose an Element Tag and use "Selected" rather than "autofill" or "current" to navigate to the content item that you want (the one with the image).
The code will look like this:
[Element name="[path]" type="content" context="selected" key="[element]"]
Where [path] is the path to the content item and [element] is the element that you actually want to pull from that content item (such as image, description, keywords, etc.)
context="selected" is the key there. Then you just need to set up your Presentation Template to be able to use this information that you are pulling in from the HTML Element.
WCM 8.5 has the InContext tag.
The InContext tag renders a tag body within a specified context. The new context can be specified as a predefined context by using a UUID, or by path.
For eg. in this case you can use below where key="Image" in InContext tag is the Link element to the CT-Image content item :
[InContext uuid="[Element context='current' type='content' key='Image' format='id']"]
[Element context="current" type="auto" key="Image"]
[Element context="current" type="auto" key="Description"]
[/InContext]

<select> tag brings up dynamically a different set of input fields depending on selection in AngularJS

Im trying to create a form, first element should be a tag with a few options and each of them will dynamically bring up a different set of forms depending on what the user chooses. The idea is within the select tag there will be different categories like cars, properties etc.. first user only sees that and when chose, it will bring up a set of input fields that required for that category.
Anyone got an idea what would be the best way to do it in angular?
Using the ui.router module, you can populate a DOM element (ui-view) with an HTML template file. On selection of the dropdown, you're telling angular to go to a different "state".
Check out the following plunkr I made: http://plnkr.co/edit/jnKQOvkE4nJinEQ5zhr6?p=preview

Drupal 7 - how can I control content layout in a view?

I've been handed a design spec which requires a news listing in a specific format - e.g. image floating to the left, with the main title and content on its right.
I've created the articles listing using the views module and embedded the view as a block on the front page. However, I need to change the layout of the resulting list of items at an html level, as the items are not provided in the order or within the html tags that I need in order to deliver the design.
In order to style the output, I really need the views module to give me fine-grained control over the html tags being wrapped around each field for each article.
Is this possible in Drupal?
(edit: please note, this is not a css question - I know how to float and position things in css. I need to be able to modify the html tags applied to fields in a view - thanks!)
When you go to your view, you will see FORMAT. You can change the Format to HTML list with corresponding settings. Under Show, you will say Fields. In the FIELDS area, choose which content you want enabled. Let me know if this helps, or if you want more of an explanation. Go back into your view and click on your field. The next window that pops up should be to configure that field. You'll see style settings where you can define the HTML tags, classes, wrappers, etc.

Featured items won't stack in rioght hand columns

My menu item "Home" points to a "featured article" which I have set with layout #leading articles =0, #intro articles=8, #columns =2. Order of presentation on the page is oldest first.
The welcome text on the left is quite long and sits on the left column ok. The next article is short as it has a read more break (like the other articles that follow) and sits on the right hand column fine.
But the next two articles hide down the bottom and across the page. I really want to make them fill up the empty space below the article on the right. There is a lot of space there as the article on the left is quite long. see www.resbona.co.uk
Is what I'm trying to do possible?- I'm using Joomlashack Vintage template with Joomla 3 (latest).
And if so how to do?
Thanks for any help
Derek
This is not possible with basic Joomla Content Component without modifying code. What you can do to archive this is:
Limit featured items count to 1
Add Articles Category module to right column
Set module articles ordering and filtering options to match your front page options
To archive the same using Joomla component only you will have to use Template Override and create your own layout for featured items or override default.

EPiServer 7 (MVC) LinkItemCollection: add images to LinkItem collection?

I have a block which is going to display a LinkItemCollection. Each link has an image which belongs to it. Since clickable image isn't supported, I was wondering if anyone had a solution of how to couple the images and links together.
Maybe you could extend LinkItem and add an Url property to an image, any ideas?
This is EPiServer CMS 7 (MVC).
I'd go with a ContentArea property instead of LinkItemCollection, and create a block type with properties for specifying link, image etc. Then add one block per link to the content area.
That also makes it a lot easier to add/remove/rearrange links with drag and drop.

Resources