loulou
|
| Posted: 02/12/2002, 5:35 PM |
|
How to display categories on menu tree depending on a condition (like a field public/private) ?
ASP please...
thks
|
|
|
 |
Alex Alexapolsky
|
| Posted: 02/13/2002, 4:02 AM |
|
create sql statemnent with proper WHERE clause and assign
it to sSQL variable in Tree/Events/Before Show
|
|
|
 |
loulou
|
| Posted: 02/14/2002, 4:40 AM |
|
Well, there is no "where" possible in CodeCharge for the menu tree form...
|
|
|
 |
Nicole
|
| Posted: 02/14/2002, 5:37 AM |
|
Hello,
create Custom Shiw event for Tree form and add proper WHERE clause there.
|
|
|
 |
loulou
|
| Posted: 02/14/2002, 6:25 AM |
|
I'm trying but always get errors...
Have you got an example, please ? Just a piece of code (ASP) not a fully fonctionnal...
|
|
|
 |
Nicole
|
| Posted: 02/14/2002, 6:38 AM |
|
What errors have you got?
|
|
|
 |
Loulou
|
| Posted: 02/14/2002, 7:19 AM |
|
In Form Properties / Custom Show, i put :
if lvl = 1 then
fldname=""
end if
lvl=1 is the condition to hide
name is category name
On the asp page, categories sometimes appear, sometimes don't...
|
|
|
 |
Nicole
|
| Posted: 02/15/2002, 4:17 AM |
|
There're 2 places where "name" field is selected from the table (once for parent category and the second time for subcategory). The output code looks like:
SetVar "Category", GetValueHTML(rs,"name")
so there's no varible fldname. Put if statement right before this line to get something like:
if lvl = 1 then
SetVar "Category", ""
else
SetVar "Category", GetValueHTML(rs,"name")
end if
|
|
|
 |
loulou
|
| Posted: 02/15/2002, 2:51 PM |
|
Thank you for your help. I found the solution (hand coding)!
|
|
|
 |