eCommerce site Demo - Product List template

merav tg asked on April 10, 2016 14:24

Hello,

I noticed that in the eCommerce demo website, there is only one template for the Product List & the Product Detail (The latter being marked as "not in layout" when on the product page and vice-versa - see screenshot below). Is there any particular reason for doing that?

Thanks,

Image Text

Correct Answer

Jan Hermann answered on April 11, 2016 12:01

Hello,

the answer is conditional layout:

https://docs.kentico.com/display/K9/Editing+page+layouts#Editingpagelayouts-Creatingconditionallayouts

If you take a look at the layout of that template you can see following code:

<cms:CMSConditionalLayout runat="server" id="listLayout" ActiveInDesignMode="true" GroupName="Product" Visible='<%# CurrentPageInfo.IsProductSection() %>'>
        <cms:CMSWebPartZone ZoneID="zoneR" runat="server" />
</cms:CMSConditionalLayout>

This code tells you when the web part zone is visible.

Best regards,
Jan Hermann

0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on April 11, 2016 09:43

Hi,

You're right this shouldn't be the case. This happens when your update the layout (so the html) of a Page Template and remove webpart zones (but you leave configured webparts in them). They will end up as orphans the way your screenshot displays.

Since Kentico version 8 they also provided a more 'realistic' demo site also including eCommerce. So you probably want to have a look at the Dancing Goat site:

Image Text

You can just select the Dancing Goat site as Web Template when creating a new Site using Wizard.

Image Text

Greets,

David

1 votesVote for this answer Mark as a Correct answer

merav tg answered on April 11, 2016 16:21

Hello,

Thanks for the answers.

Do you have any idea what's the purpose of using conditional layouts? Is this aiming to improve the product details loading time?

Best,

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.