Search
Other Sourcerer questions
Forum

advice on getting joomla tags using this plugin

moses's Avatar moses
hello,
i am just front end developer not much of server side, just want help understanding how can i get a parent tag children in a list?
please advice ?

i tried this but its kills the page
$parent_tag_id=397; // your tag id here
JLoader::register('TagsHelperRoute', JPATH_BASE . '/components/com_tags/helpers/route.php');
$tags_tree=JTable::getInstance('Tag', 'TagsTable')->getTree($parent_tag_id);
// Show children:
foreach($tags_tree as $tags_tree_id=>$tags_tree_item) {
    echo 'DEBUG: ';
    echo ' id:'    . $tags_tree_item->id;
    echo ' level:' . $tags_tree_item->level;
    echo ' path:'  . $tags_tree_item->path;
    $link=TagsHelperRoute::getTagRoute($tags_tree_item->id . ':' . $tags_tree_item->path);
    echo ' link: ' . JRoute::_( $link, true, 1);
    echo '<br>';

}
Peter van Westen's Avatar Peter van Westen ADMIN
That really has nothing to do with Sourcerer itself and is a general Joomla PHP question.
I recommend you ask for advice on the general Joomla forum:
forum.joomla.org

Also, switch Error Reporting to 'developer' in the Joomla configuration when testing PHP stuff, so you can see what is breaking the page.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription