Remove checkbox from top level category when 'get options for database'

5 posts by 2 authors in: Forums > CMS Builder
Last Post: May 16, 2014   (RSS)

I have one section that creates a categories menu that allows a user to generate tags and create a category list. This menu is then brought into a section through 'Get options from database (advanced)' and the user checks-off appropriate tags. Is there a way, in the CMS editor, to remove the check box from the top level category and make it bold. Basically, creating a category menu within the CMS. There is not need to check the top level options and it looks confusing to a user.

Any suggestions?

Thank you,

Josh

Hi Chris,

Thanks for getting back to me.

Basically, what I would like to do is, in the CMS, have imported category menus arrange so they show the category levels in a logical manner as opposed to one indiscriminate checklist as shown in the attachment. The menu is limited to 2 level, so there is only one level of multiple category headings and an then multiple list items, in a sense. (Note: I am referring to the functionality in the CMS, not on the webpage.)

What I'd, ideally, like to happen is that the 1st level, or heading, show in bold - or - the 2nd level, or list items, become indented. This way, there is a clear, logical distinction in the CMS as to what is a heading or list item and easy for the client to understand the list.

I'm not sure if there is a simple way that I am overlooking or if it is a simple tweak or not. Either way, it's not that big of a deal, but I think it would be a little more clear for the client.

A screen shot of the CMS and webpage is attached. I've also attached a shot of the screen editor.

Thanks,

Josh

Attachments:

cms.jpg 93K

webpage.jpg 75K

cms_editsection.jpg 235K

By Chris - April 29, 2014

Hi Josh,

It's not possible to make the fields bold without developing a custom plugin, but what you can do is use a custom Mysql query to add a hyphen and a space (for example) before the labels of checkbox items with a depth > 0 (top-level categories have a depth of 0).

List Options:

Get options from MySQL query (advanced)

SELECT `name`, CONCAT(IF(`depth`, '- ', ''), `name`)
FROM `<?php echo $TABLE_PREFIX ?>portfolio_tags`

(Or see the attached screenshot)

I hope this helps. If you still need bold items, we can build a custom plugin for you through our paid consulting service -- please let me know if that's something you're interested in.

All the best,
Chris
Attachments:

portfolio_tags.png 14K

Thanks, Chris. I like the solution of having the > 0 items with a "-" and it almost does it, but creates a second issue: The items with a depth of 0 are all at the top of the list and those with a depth > 0 are below. If it's not possible to easily have the list stay in depth order using this advanced query, then no problem. I'll consider a custom plug-in if my client has an issue with what is otherwise achievable.

Josh