Skip to content

Instantly share code, notes, and snippets.

@Realetive
Created June 22, 2016 00:55
Show Gist options
  • Save Realetive/c58c439cecaeba74c93376ec0807034f to your computer and use it in GitHub Desktop.
Save Realetive/c58c439cecaeba74c93376ec0807034f to your computer and use it in GitHub Desktop.
Use pdoMenu for generate JSON tree of resources.
[[pdoMenu:striptags:htmlentities:strip?
&lastClass=`last`
&firstClass=``
&hereClass=``
&parentClass=``
&rowClass=``
&outerClass=``
&innerClass=``
&levelClass=``
&selfClass=``
&webLinkClass=``
&tplOuter=`@INLINE [ {$wrapper} ]`
&tplInner=`@INLINE {$wrapper}`
&tplParentRow=`@INLINE { "{$alias}": {
"title" : "{$pagetitle}"
, "parent" : "{$id}"
, "subfolder" : { {$wrapper} }
} } {$classes | match : '*last*' ? '' : ','} `
&tpl=`@INLINE "shop_{$id}" : {
"name" : "{$pagetitle}"
, "title" : "{$longtitle}"
, "address" : "{$description}"
, "workTime" : "{$introtext}"
, "phoneCode" : "{$alias}"
, "phone" : "{$menutitle}"
, "pickup" : "{$published}"
} {$classes | match : '*last*' ? '' : ','} `
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment