I must say that xataface is the slickest code I have seen so far. Great job.
I have developed a DB-driven site engine and am trying to use xataface for the admin part of it. I have a table field 'block_page' that will determine on what page a particular block should be displayed. Now the problem is that this field can hold 'pagename', 'all', or '_DISABLED_pagename'. 'Pagename' would be the name of the page the block should be displayed on, 'all' would mean it would display the content block on every page and '_DISABLED_pagename' would exclude this block on a particular page.
I have also a table called 'pages' and set up in the fields.ini for this table the drop-down to chose a page from the list.
- Code: Select all
entry in fields.ini
[block_page]
widget:label = "Page Name"
widget:description = "Select the Page you want the Block to be displayed on"
widget:type = select
vocabulary = Pages
entry in valuelists.ini
[Pages]
__sql__ = "SELECT page_name FROM Pages ORDER BY page_name"
I was wondering how could I add another checkbox field 'display' to the form so that depending on the field 'display' the data in the field 'block_page' would show either 'pagename' or '_DISABLED_pagename'. Also how could I add the selection 'all' to the drop-down without having to add a page called 'all' to the 'Pages' table.
I apologize if that might sound a bit confusing.
I would greatly appreciate any help with this matter.
Thank you very much.
Chris
