Hi Everyone,
First time posting here!
I have a website that has a horizontal main navigation at the top. What I am trying to do is have the main top navigation with drop downs (which works). The second navigation is going to be Dental Service to show in the right red box down by the content. We want to show all the sub menus under Dental Services.
My goal is to have one template to call the different interior page menus for the different sections. I figured doing this would require a "if statement", but I can't get it to work. To be honest I am new at Modx and also new with PHP. I have been trying to work this out for 8hrs. I have also tried searching to see if any one had any examples how to do this. I found BobRay had one article. I tried his example, but was completely lost.
Example of Main Menu:
Dental Services (2)
- Fillings(7)
- Teeth Cleaning(11)
New Patient(3)
- New Patient Form(8)
- Insurance Accepted(9)
Our Practice(4)
Directions(6)
Contact Us(5)
Here is the example of a if statement that I was working from seeing at BobRay
<?php
$current_docid = $modx->resource->get('parent');
$output ='';
if($current_docid ==2){
$output .='[[!Wayfinder? &startId=`2` &level=`1` ]]';
}
?>
Here is the website that I am working on.
http://www.drloperdentist.com/dental-services.html
You can see that the "Fillings" sub nav is coming in, but if you click on the top main navigation and go to "New Patient" it show that same navition there. At this point it shouldn't show at all.
I also noticed just above the "Fillings" it has this
resource->get('parent'); $output =''; if($current_docid ==2){ $output .='