2013-08-18, 22:29:34
(2013-08-16, 01:59:04)Bigin Wrote:(2013-08-15, 22:28:56)amnesiac Wrote: But I have a question: how can I make component to output a list of categories?
Yep, you can use something like this:
PHP Code:$preferences = (imModel::getPref());
foreach($preferences->categories->category as $cat)
echo $cat .'<br />';
Thanx, it works.
Does categories have an internal ID, or just name? I need to add links to category list:
PHP Code:
echo '<a href="/some_page/?category=' . $cat . '</a><br />';
I think it's not good idea to use in links names of categories with spaces and not-latin symbols.