Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi all,

I'm playing around with generating css from couch.
Currently using a repeatable to get various breakpoints (name & width) within the template tags.
Code: Select all
            <cms:repeatable name='bps' label='breakpoints'>
                <cms:editable name='name' type='text' required='1'/>
                <cms:editable name='width' type='text' required='1'/>
            </cms:repeatable>


In the show_repeatable I would like to be able to create variables named 'bp--{name}' and set to width.
Code: Select all
        <cms:show_repeatable 'bps'>
            // How to set variable here
            <cms:set ??? = "<cms:show width />" 'global'/>
        </cms:show_repeatable>


So we could have 'tiny' '320px', 'smaller' '480px', 'small' '768px', etc
and I want to somehow <cms:set bp--tiny='480px'>, <cms:set bp--smaller='480px'>,<cms:set bp--small='768px'>, etc.

this is so i can then use <cms:show bp--tiny /> in css.


Am hunting through the forums, but no luck yet.

Any ideas?

cheers, gwil
Please try using <cms:put> which accepts a string as the variable name e.g.
Code: Select all
<cms:put "bp--tiny" "480px" 'global'>
Perfect. Thank you once again.
cheers,
gwil
3 posts Page 1 of 1