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

The project I'm working on requires to have custom checkbox/radio styles. But I see that with the current markup, the usual input:checked + label is of no use. I did some search around the forum and found this topic: viewtopic.php?f=4&t=8779&p=17369&hilit=checkbox+markup#p17369
But that doesn't look like the most elegant solution. So I tried going through the code in an attempt to tweak the markup myself, found some relevant code inside couch/field.php around line 1320 but it didn't look like it was doing anything.

Is this the right markup but I'm doing something wrong? Or do I have to look somewhere else?

I'll take that this is for Couch v2.x, right?
If so, you are free to use your own markup for most fields.

As explained in the docs on v2.0 (viewtopic.php?f=5&t=10241), activate your 'sample' theme and then copy into it 'couch\theme\_system\field_checkbox.html'.

Tweak it to your liking as this is the markup that Couch will now use for rendering checkbox regions.

Does this help?
Thanks KK. So if I understood correctly, the 'sample/' folder is a clone of the '_system', and once I activate that from the config file, Couch will start using those files instead?

And yes, I'm using Couch 2.0.
Not exactly a clone (as it does not need to have exactly the same files as contained in system) - rather, it is an alternative location where Couch looks for the templates to render.

Broadly speaking, when searching for a template to render, Couch first looks into the 'sample' folder (or whatever you have named your theme folder in config) and if it does not find it there, moves on to look into the system folder.

This way any template placed in the theme folder will be found first and thus override the default system template.

Hope that clears up things a bit.
4 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest