Two questions
1. Is there a way to change the default page size on group views from razor?
2. Where is the "Details" loop in Razor in the product view? Without Details, it's not possible to extract the image list from details.
Two questions
1. Is there a way to change the default page size on group views from razor?
2. Where is the "Details" loop in Razor in the product view? Without Details, it's not possible to extract the image list from details.
@1: You can add &pagesize=10 to the querystring - but not in the loop code. Razor is simply a rendering engine...
@2: In your product template, do this:
@foreach(LoopItem i in GetLoop("Details")){
}
OK. It's not an issue with #1, bu it leads to a slightly more complex menu template with a lot of conditions
I tried TemplateTags() and the loop is not listed. Then checked the templates reference and tried the code you listed with simething like:
foreach(LoopItem i in Product.GetLoop("Details")){
@i.TemplateTags()
}
But that gives me nothing
And please don't tell me the detail are not in the products loop on a group view
Hi Peter
@1: The 'model', the data to show, is made before the rendering. The razor template is the rendering, so you cannot go back in the stack and change things. Hope that makes sense.
@2: That loop is not in a list of products. Because of performance. May I suggest a custom field maybe?
You must be logged in to post in the forum