rajani,
I'm not quite sure I've properly understood you requirements, but you could write a sub-routine that would query your category table and get the sub-categories of the category you are currently in using a statement along these lines:
SELECT ID FROM Category WHERE Name LIKE '$value%'
You could pass the current category name to $value and it should bring back a list of ID's that are sub-categories of the category you are in. Once you've got the sub-cat ID's you can get the name and/or description and 'chop' out the current category name, e.g.;
/World
/World/Europe
/World/Europe/France
/World/Europe/Germany
/World/Europe/United Kingdom
If you select the sub-cat's of "/World/Europe" you would get:
/World/Europe/France
/World/Europe/Germany
/World/Europe/United Kingdom
... then just chop out the current category part "/World/Europe/" to end up with:
France
Germany
United Kingdom
... same with 'World':
Europe
Europe/France
Europe/Germany
Europe/United Kingdom
... if you want the results formatting before putting them in a select list use the existing sub, or create a new one. You might also want to pass the sub-cat's ID or Path into your select list to make sure Links knows which sub-cat it's dealing with, e.g.;
<OPTION VALUE="$sub-catid">France
<OPTION VALUE="$sub-catpath">Germany
etc ...
</SELECT>Hope this helps.
All the best
Shaun
I'm not quite sure I've properly understood you requirements, but you could write a sub-routine that would query your category table and get the sub-categories of the category you are currently in using a statement along these lines:
SELECT ID FROM Category WHERE Name LIKE '$value%'
You could pass the current category name to $value and it should bring back a list of ID's that are sub-categories of the category you are in. Once you've got the sub-cat ID's you can get the name and/or description and 'chop' out the current category name, e.g.;
/World
/World/Europe
/World/Europe/France
/World/Europe/Germany
/World/Europe/United Kingdom
If you select the sub-cat's of "/World/Europe" you would get:
/World/Europe/France
/World/Europe/Germany
/World/Europe/United Kingdom
... then just chop out the current category part "/World/Europe/" to end up with:
France
Germany
United Kingdom
... same with 'World':
Europe
Europe/France
Europe/Germany
Europe/United Kingdom
... if you want the results formatting before putting them in a select list use the existing sub, or create a new one. You might also want to pass the sub-cat's ID or Path into your select list to make sure Links knows which sub-cat it's dealing with, e.g.;
Code:
<SELECT> <OPTION VALUE="$sub-catid">France
<OPTION VALUE="$sub-catpath">Germany
etc ...
</SELECT>
All the best
Shaun