lgalocgoc2
Posts: 35
|
Posted: 10/19/2012, 6:06 AM |
|
Hello Everyone,
I need help on displaying a specific page in the menu when login only as admin in CCS project.
Please help me.
Thanks.
|
|
|
bannedone
Posts: 273
|
Posted: 10/19/2012, 2:04 PM |
|
Create 2 panels
One that shows when logged in as admin. one that shows all othher times.
Use HideShow Component event for the panels and hide/show based on the users groupID
Put a copy of the menu you wish to have for each condition in the appropriate panel
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/19/2012, 3:00 PM |
|
Hello bannedone,
Thanks for your reply..but how can I do it? I am new with CCS, I'm sorry.
I tried to looked an answer but I can't find an exact one.
What I want to happen is that, when a user login as ADMIN, a different menu is displayed.
Please help.
Thanks.
|
|
|
bannedone
Posts: 273
|
Posted: 10/21/2012, 12:22 PM |
|
Hi
Create 2 panels. One for the Admin Login and one for other times.
Inside each panel add the appropriate menu. (I am assuming you are using static menus. Database driven menus could use a differnt approach).
Be sure both panels are visible.
Now for each panel in the BeforeShowEvent do a Hide Show action for each.
For your panel with the Admin menu Hide that panel if CCGetSession("GroupID","") does not equal the Security Group number you have assigned to the Admin in the projects Security Groups settings
For your Panel with the Non-Admin menu Hide if CCGetSession("GroupID","") equals the Security Group number you have assigned to the Admin in the projects Security Groups settings
Hope that helps
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/22/2012, 3:36 AM |
|
Hello bannedone,
Here is the code I add in the Before Show event.
If not logged in:
if(!CCGetUserID()) {
$Container->Menul->Visible = true;
} else {
$Container->Menul->Visible = false;
}
If logged in:
if(CCGetUserID()) {
$Container->Menun->Visible = true;
} else {
$Container->Menun->Visible = false;
}
My problem is, it only execute the first one. So if I changed the first panel to a "not logged in" code, the menu appear when not login but when I changed the first panel to a "logged in" code the menu appear when logged in. But the second panel it seems does not work.
Please help.
Thanks.
|
|
|
bannedone
Posts: 273
|
Posted: 10/22/2012, 7:33 AM |
|
Hmmmm
LOL This is not even close to what I suggested...
If all you care about is if someone is logged in or not. Then if the person is an Admin makes no difference.
You are checking in your code if someone is logged in or not.
Also if you plan to do it this way instead of like I suggested using the Hide / Show action, be sure you are using the correct names of the panels in your code.
Be sure the panels are set to visible and then try this in the BeforeShow event.
if(!CCGetUserID()) {
$Container->Menul->Visible = false; //Menul is your admin menu panel
}
if(CCGetUserID()) {
$Container->Menun->Visible = false; //Menun is your NON-Admin Menu panel
}
Just wondering why you decided to do it this way???
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 4:38 AM |
|
Hello,
One of the menu panel is not really showing up..I don't know what's wrong with this. It's been week now solving this problem.. please help.
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 4:57 AM |
|
It seems that the last menu panel I added in my index page, is the one to be executed but the first panel for menu has been ignored. please help.
|
|
|
Waspman
Posts: 948
|
Posted: 10/23/2012, 5:11 AM |
|
Do what Bannedone says, use the hide and show event it should help you clear things up.
_________________
http://www.waspmedia.co.uk |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 5:15 AM |
|
How can do that?
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 5:15 AM |
|
How can I do show/hide event?
please help
|
|
|
bannedone
Posts: 273
|
Posted: 10/23/2012, 6:59 AM |
|
1. Add the panels with menus and before doing anything be sure both menus show up.
2. Then select the panel and in the properties pane select events tab
3. Select Before Show, then add action... There you will see the hide / show action.
4. Set your parameters as I originaly suggested.
5. Do that for each panel.
The only ohter way to help you is to code it for you.
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 5:33 PM |
|
hello..thanks for the reply.
What are the specific value i'll add to the hide/show component?
thanks.
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 5:34 PM |
|
Why is it that if I have two the same panel "Menu", it only reads the last one. But if I'm going to use other Placeholder for my panel, the code works.
Why?
|
|
|
bannedone
Posts: 273
|
Posted: 10/23/2012, 7:56 PM |
|
Hmmm
Did you get the page to display both menus before trying to hide them???
I suppose I am not communicating effectively with you.
So Sorry my fault.
Try RTFM...
That might help
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 8:12 PM |
|
Hello,
Is it possible to display both same panel (menu) at the same time? mine don't.
thanks.
I read the manual already and read other forums but still couldn't not find the exact answer.
Please help.
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 8:21 PM |
|
by the way, i am using artisteer for my page
|
|
|
bannedone
Posts: 273
|
Posted: 10/23/2012, 8:31 PM |
|
What versions of CCS and Artisteer.
LOL Wonder why you just now let us know this??
If you are using CCS5 and Artsy 3.1 or 4 with Designs... Be sure you are implementing these panels inside the menu panel in your page.
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 9:01 PM |
|
I am using CCS5 and Artisteer 4...
It goes like this:
When I applied the design to my page, it automatically generate the panel for menu..then I added another panel for the second menu..then I add the code:
In the first panel under BeforeShow event:
if(!CCGetUserID()) {
$Container->Menul->Visible = false; //Menul is your admin menu panel
}
In the second panel under BeforeShow event:
if(CCGetUserID()) {
$Container->Menun->Visible = false; //Menun is your NON-Admin Menu panel
}
but as usual the last panel is the one to be executed, the first one was ignored.
But if I am going to used another Placeholder for my panel, i.e the first panel placeholder is "Menu" the second panel placeholder is "Head", the code works.
Is it possible to used the same panel in a page? I mean, two panel with the same placeholder in one page?
Please help me..
Thanks.
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 9:03 PM |
|
Quote bannedone:
If you are using CCS5 and Artsy 3.1 or 4 with Designs... Be sure you are implementing these panels inside the menu panel in your page.
Is it you mean, i will add two other panel inside the menu panel?
|
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 9:05 PM |
|
I am sorry, I am new with CCS and Artisteer.
|
|
|
bannedone
Posts: 273
|
Posted: 10/23/2012, 9:13 PM |
|
Hey man
Not to sure why I am having trouble communicating.. But here goes again...
I know CCS5 with Artsy designs create a menu pnnel.
I just mentioned above that these 2 new panels for your menus need to be INSIDE the CCS generated menu panel
So here goes again.... With the once unkown information
Create a new page
Apply the design
Now inside the CCS Generated Menu panel
Create your 2 panels. Put Menus inside each one.
Now try the hide/show component stuff I have tried to explain before
If this finaly works for you, let me know. If you would like to donate you can at paypal.com to the account of paypal@jjrjr.com
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
lgalocgoc2
Posts: 35
|
Posted: 10/23/2012, 9:15 PM |
|
Hi bannedone,
Thank you very much.
I got it now.
It's just add the two panel inside the menu panel..huh! at last!
Thanks sooo much...
|
|
|
bannedone
Posts: 273
|
Posted: 10/23/2012, 9:27 PM |
|
Whew!!! This one was exhausting. LOL
Always easier when all the details are shared.
Glad to Help!!!
Have fun
How about a donation????
The paypal account is paypal@jjrjr.com
_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2 |
|
|
|