Skip to content

Instantly share code, notes, and snippets.

View Yiannistaos's full-sized avatar
🏠
Working from home

Yiannis Christodoulou Yiannistaos

🏠
Working from home
View GitHub Profile
@Yiannistaos
Yiannistaos / gist:4cc24e6e6c43e90bdce92e59c072ebdc
Created March 10, 2017 10:09 — forked from mbabker/gist:3211464
Creating a category via component postflight
// Get the database object
$db = JFactory::getDbo();
// JTableCategory is autoloaded in J! 3.0, so...
if (version_compare(JVERSION, '3.0', 'lt'))
{
JTable::addIncludePath(JPATH_PLATFORM . 'joomla/database/table');
}
// Initialize a new category
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>