For the complete documentation index, see llms.txt. This page is also available as Markdown.

Special field - count of related records

See cpage.php for chapters - it displays count of related pages as standard field

Admin UI field:

'chapter_page_count' => array('title'=> 'CUSLAN_87', 'type' => 'number', 'data'=>false, 'width' => '5%', 'readonly'=>TRUE, 'thclass'=>'center', 'class'=>'page-count center'),

Note: 'data'=>false, and 'readonly'=>TRUE, in definition It works because of this:

(SELECT COUNT(*) FROM `#page` p WHERE p.page_chapter = a.chapter_id) AS chapter_page_count 

It is not implemented correctly in edit mode. Still editable, only not saved. So for now, this is not a solution for only informative fields.

Last updated