Children of children?
|
1493 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. |
|
541 posts
|
maybe if you use $page3 instead of $level3 ;) in : |
|
1493 posts
|
Ahh, now I see what you pointed out ... but sadly, I am getting the very same error message. :( Thanks anyway! Any other ideas? |
|
1493 posts
|
FWIW, this is line 170 of \frog\app\frontend\classes\Page.php:
Does that suggest anything?? |
|
1493 posts
|
P.s. You can see this code trying to work in the "GB Pages" and "Poet" sections of the this Frog "test site". |
|
83 posts
|
nice david, very nice! |
|
541 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); ?> |
|
541 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 |
|
1493 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. |
|
1493 posts
|
@Philippe - yes, "Edit Post" would be nice! :) On the live site, my |
|
541 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 |
|
83 posts
|
waaaaaah, awesome, just awesome! that is really what i needed! nice little community! thanks david and phillippe |
|
83 posts
|
i just copied and paste it but it wont work, i also turned 2,3 into 1,2 on the first line! :> |
|
1493 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. |
|
83 posts
|
frog.bugeyes.de is my url and i have only static pages ;> |
|
1493 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? |
|
83 posts
|
i have icq: 195073908 url of subpage is about and yes i put it in the homepage sidebar! |
|
1493 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. |
|
1493 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. |
|
83 posts
|
i did it, nothing happens! :> |
|
83 posts
|
u may need the default installation password at my url to please check it! |
|
1493 posts
|
Hmmm.... Can you send me an email at dajare {at] gmail [dot} com? I will be out for a while now, though. |
|
1493 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. |
|
83 posts
|
thanks so much, i ony need lvl 2, so its ok this way! |
|
1493 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 |