简体   繁体   中英

how to create category in joomla 2.5 programmatically using external php file

I have loaded joomla environment using external php file.

<?php
require_once('configuration.php');
// Create a JConfig object
$config = new JConfig();
// Use the object in a meaningful way

?>

Now how to create a new category under a parent category..

You should use joomla's API because there is an asset table which you don't want to screw Same question was already posted here: How to add categories in Joomla 2.5

An example how this could be handled check: https://gist.github.com/mbabker/3211464

with the setLocation, you can set the parent category

How you get the Joomla Framework in your external file can be found here: http://docs.joomla.org/How_to_create_a_stand-alone_application_using_the_Joomla!_Framework

Hope this helps your needs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM