minder
Posts: 2
|
| Posted: 02/13/2008, 2:19 AM |
|
I have two grids on a page and would like to hide one based on the url
So I need to show the first grid if url is ?section=sport
and the second if the url is ?section=sport&category=soccer
I also have a nav bar on the page which shows categories for the section in the url
so as you can see I need to keep the section= in the url
Hope this makes sense
I can achieve this using IDs like ?section=1 & category=2 but prefer to use names.
any suggestions
Thanks
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 02/13/2008, 7:46 PM |
|
minder
All you need to do is on the page with the two grids (assuming that they are in panels) in the event Before Show use the CCS function CCGetParam to obtain the value of section and category (from the url) and then turn your panels off and on. Hopefully this will make sense.
These links may help you: http://docs.codecharge.com/studio40/html/Components/Fun...tParam.html?toc http://docs.codecharge.com/studio40/html/ProgrammingTec...l/Overview.html
|
 |
 |
minder
Posts: 2
|
| Posted: 02/15/2008, 9:36 AM |
|
Thanks for your reply mamboBROWN
I have read the references you gave but i still don't understand it.
I will play around with it again tonight and see if I can get a handle on it
Minder
|
 |
 |
Minder2
Posts: 3
|
| Posted: 03/08/2008, 1:15 PM |
|
Following on from the above
my url php?section=Stats&category=Fixtures
or php?section=Stats&category=Results
Fixtures and Results are seperate components on the same page
I can hide either depending on the url like so
// -------------------------
if (CCGetFromGet("category","Fixtures") == "Fixtures")
$Component->Visible = True;
else
$Component->Visible = False;
// -------------------------
My problem is if my url is php?section=Stats Both components are visible and with this url I would like to hide both
How can I work the section=Stats in to the if statment or is there another way I might do this
Thank You
|
 |
 |