Need help translating PHP into PHP-Jade

Hi all!

I am currently working on a Gulp process featuring Stylus, Jade, File Copy, BrowserSync, PHP server,etc.

I am almost done the first version of the scaffold but I am running into problems translating the Menu Snippet into PHP-Jade.

I need to translate this block into my JadePHP:

  <a <?php e($p->isOpen(), ' class="active"') ?> href="<?php echo $p->url() ?>"><?php echo $p->title()->html() ?></a>

Here is my current Jade structure, this needs to go right in the tag nav(role=“navigation”)

nav(role=“navigation”)
ul(class=“menu cf”)
- foreach($pages->visible() as $p):
li
a(href!="<?php echo $p->url() ?>")
= $p->title()->html()
- if($p->hasVisibleChildren()):
ul.submenu
- foreach($p->children()->visible() as $p):
li
a(href!="<?php echo $p->url() ?>")
- endforeach
- endif
- endforeach

Excited to share the scaffold once it’s done!!!
I