58 Posts
rasch-dmd
6 years ago
3
Topic

Hello Community,

I am stuggle with an problem:

I build a huge website with currenty 10000 categories. 

I have to render only the sprecial subcategories from a parent catid in a list and seach type.


My try was to build a select dynamic with this free query:

SELECT CONCAT( REPEAT('-', (category.level)-1), category.title) AS text, category.id AS value
FROM #__categories AS category
LEFT JOIN #__categories AS parent
ON category.lft BETWEEN parent.lft AND parent.rgt
WHERE parent.id = 225 ORDER BY category.lft

what points on catid like the normal category field.

The problem is, that I have do define the special parent category id in a overwrite in the menu item.

So the number 225 in the dynamic field must be the field, who is to overwrite in the menu item.

What I have to do. Can you help me.

Thanx.

RaSchDMD

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
0
Level 1

Select dynamic doe not support that - one thing you could use is select dynamic cascade, you can put first cascade with parent to hidden place and then get this value in second cascade

58 Posts
rasch-dmd
6 years ago
1
Level 1

Hello Klas,

thanx for your help.

Can I use variables like [parent_id] in a free seach of a select field. I need the live value of the field, perhaps [live_value].

So I can make a query like that:

SELECT CONCAT( REPEAT('-', (category.level)-1), category.title) AS text, category.id AS value
FROM #__categories AS category
LEFT JOIN #__categories AS parent
ON category.lft BETWEEN parent.lft AND parent.rgt
WHERE parent.id = [live_value] ORDER BY category.lft

Thank you for an answere.

RaSchDMD

4229 Posts
Kadministrator
6 years ago
0
Level 2

Get a VIP membership