¡Hola, amigos! I’m Señor FAQ, the mustached maestro of questions and answers! With my trusty glasses and a book of endless wisdom, I turn dudas into solutions. Soy el héroe de los curiosos and the champion of clarity.
JScms_get_cat_notused
The JScms_get_cat_notused
function retrieves all categories from the database that are not assigned to any page and do not have an external URL.
JScms_get_cat_notused(object $jakdb): array
$jakdb
: (object) Database connection instance.
(array) An array of categories with their id
and name
.
<?php
$unusedCategories = JScms_get_cat_notused($jakdb);
foreach ($unusedCategories as $category) {
echo $category["id"] . ": " . $category["name"] . "\n";
}
?>
categories
table structure matches the function's expectations.categories
table has pageid
and exturl
fields.