use case for 2sexy content suggestions needed

Jan 15, 2014 at 2:57 PM
Hi

I am using 2sexy content for a slider and I let users enter a bunch of items and they will be converted to a slider consisting of 2 or more items using

if ((rowCounter % 2) == 0)

I have a few templates each with a different number of items per slide

is it possible with 2sexy content to set a globa setting that I can change per module so I can just have one template and i have a global setting that user can set for a module that sets the nr of items?
Developer
Jan 15, 2014 at 3:22 PM
Hi nokiko

I don't fully understand why the user should configure the number of items. Could you maybe paste your template and your content type configuration (fields)?

Regards
Raphael
Jan 15, 2014 at 5:11 PM
HI Raphael

well here is a screenshot of 2 sliders

http://screencast.com/t/KPoU1PLF

as you can see one with 2 items per slide and one with 3 items per slide ( content-type : title, link ) as a list

so for this i have the following code

http://screencast.com/t/KybQrUgUPzV

as you can see it goes through the list and it closes the html for the sldier after each 2 item making each alide have 2 items. now i have another template with 3 items.

slider2.cshtml
slider3.cshtml

But best was that there were global settings that could be set on a module instance base and not on a per item base. so I could use tempalte.cshtml and then the user could set if they wanted a slider with 2 3 or more items without me having to amke another tempalte

btw did you enjoy the beer I send over to the office a while ago :)
Coordinator
Jan 16, 2014 at 7:04 AM
Hi Nokiko

Yes, thanks a bunch for the beer :)!

What your looking for is a way to give a list some settings. This is best done in the List-Header or List Presentation. Officially it should be in the List-Presentation. Create a content type to manage your settings and then use that as the List-Presentation type. Give it a try :)!

Best,
Daniel
Jan 16, 2014 at 7:19 AM
Hi Daniel

thanks , and considering my razor template , how do i retrieve the value of that so what do i ply in place of the "2"
Coordinator
Jan 16, 2014 at 1:40 PM
Please watch this video: http://2sexycontent.org/en-us/learn.aspx#FancyDetail-1189

And look inside the samples here: http://2sexycontent.org/learn-tokens/en-us/learntoken-lists.aspx
...and herehttp://2sexycontent.org/learn-razor/en-us/lists.aspx

On the second page, I just created a demo for you using the ListPresentation

In general you'll write things like @ListPresentation. Stay sexy :)
Daniel
Jan 16, 2014 at 1:45 PM
Thanks

that helped now I can clean up some templates.

Been using the module for like 90% of my client's website content. Real growing fond of the services and json combination as well. Only thing I need to learn is how to use knockout , any change of a simple sample for that one in the near future?
Coordinator
Jan 16, 2014 at 1:47 PM
Working on it :)

Must first release Version 5.4 (next week...) with a bunch of new toys incl. GPS pickers, Page-Link handling (so moved pages don't break links :) better import/export - you'll love it.
Jan 16, 2014 at 1:52 PM
Yeah really looking forward to good import export

Working on a new skin for sale with lot of predefined content and shortcodes. All made with 2Sexy content. But I need to be able to package it so it can be resused easily