Children of children?
|
Mar 25, 2008 13:59
963 posts
|
I have been trying to find a solution to the question about a vertical menu, so that when you click on a level, the menu on the next level below is revealed. (Asked as post #29 in this thread.) I think I almost have it. Well, I have it working for Home > Level1 > Level2, but not for Level3. I get this error message for "Level3": Here is my code:
A couple notes: (1) the first "explode" line gets me the "slug", and the numerical index would need to be adjusted depending on where Frog lives on your server; (2) the The line that produces the error is this one: Can anyone give some help on this? Many thanks! David. |
|
Mar 25, 2008 16:34
390 posts
|
maybe if you use $page3 instead of $level3 ;) in : |
|
Mar 25, 2008 16:51
963 posts
|
Ahh, now I see what you pointed out ... but sadly, I am getting the very same error message. :( Thanks anyway! Any other ideas? |
|
Mar 25, 2008 16:59
963 posts
|
FWIW, this is line 170 of \frog\app\frontend\classes\Page.php:
Does that suggest anything?? |
|
Mar 25, 2008 18:19
963 posts
|
P.s. You can see this code trying to work in the "GB Pages" and "Poet" sections of the this Frog "test site". |
|
Mar 26, 2008 02:33
83 posts
|
nice david, very nice! |
|
Mar 26, 2008 09:37
390 posts
|
ho ok I see you have to search for $level2.'/'.$level3 and your level 3 can't be found because you add single quote , so php will always search for "$level3" as the content. maybe trying this plus what I mention before: <?php $page3 = $this->find($level2.'/'.$level3); ?> |
|
Mar 26, 2008 09:38
390 posts
|
oups forgot one ` ;) sorry ... ok ok I will finish the forum soon for sure ;) like that we will be able to edit our post |
|
Mar 26, 2008 10:01
963 posts
|
Genius! You sorted it, Philippe! I should have caught the If anyone wants to try it, here is the exact working code that I have in the sidebar of the Home Page:
Again, you may need to adjust the Thanks, Philippe! And I hope that helps... David. |
|
Mar 26, 2008 10:03
963 posts
|
@Philippe - yes, "Edit Post" would be nice! :) On the live site, my |
|
Mar 26, 2008 11:34
390 posts
|
remember the forum at philworks.com/forum !!! I haven all debug it yet and I have to add the "notification system" working hope to have time soon. I'm currently really busy. and thank you for your help in the forum david |
|
Mar 26, 2008 15:36
83 posts
|
waaaaaah, awesome, just awesome! that is really what i needed! nice little community! thanks david and phillippe |
|
Mar 26, 2008 16:06
83 posts
|
i just copied and paste it but it wont work, i also turned 2,3 into 1,2 on the first line! :> |
|
Mar 26, 2008 16:25
963 posts
|
What is the URL of your site? It may be you need different values for those variables. Also, it won't work for "Archive" type pages, because they have a different URL structure -- only for "static" pages. |
|
Mar 26, 2008 16:31
83 posts
|
frog.bugeyes.de is my url and i have only static pages ;> |
|
Mar 26, 2008 16:39
963 posts
|
Do you have IM of some kind? Gchat maybe? I see the error is in line 2! Seltsam! What is the URL for one of your subpages? Did you put that code in the Home Page sidebar? or somewhere else? |
|
Mar 26, 2008 16:41
83 posts
|
i have icq: 195073908 url of subpage is about and yes i put it in the homepage sidebar! |
|
Mar 26, 2008 17:05
963 posts
|
OK. I see the problem. You aren't using .htaccess, are you? The "?" in the URL is causing problems. Can you enable .htaccess? Here are the instructions from the readme.txt file Frog's root folder: optional (to remove the ? in the url)
If you enable that, you should be fine! Hope that works! (I couldn't get online ICQ to work! You might find it useful to have a gmail account! :) ) David. |
|
Mar 26, 2008 17:08
963 posts
|
You also have the option to use ".html" as the URL suffix. You should probably change this in config.php, too, so it reads like this:
That D. |
|
Mar 26, 2008 17:16
83 posts
|
i did it, nothing happens! :> |
|
Mar 26, 2008 17:20
83 posts
|
u may need the default installation password at my url to please check it! |
|
Mar 26, 2008 17:27
963 posts
|
Hmmm.... Can you send me an email at dajare {at] gmail [dot} com? I will be out for a while now, though. |
|
Mar 27, 2008 05:59
963 posts
|
Update: There were complications of two kinds:
There are two solutions, if this technique is to work:
I tried to solve #2 - and with this additional line (2nd line below), it works at "Level 2":
That strips the URL suffix, and then you use So -- to use this technique, either (a) get rid of URL suffixes!, or (b) get Philippe to work out a complete solution to #2. :) David. |
|
Mar 27, 2008 06:51
83 posts
|
thanks so much, i ony need lvl 2, so its ok this way! |
|
Mar 27, 2008 11:24
963 posts
|
If anyone else cares :) there was a further problem with this technique, in that when you did get down to a "Level 3" page, it threw off the truncating technique described in post #23 above. I have managed to find a way around that! So, here (for the record!) is the complete working code on aroundthefur's site:
The |