Hello Jason,
could you be a little bit more explicit regarding the "risks and issues"?
An employment agency wants to be able to upload the job offers to several portals (like Monster) as complete HTML files. So in the MODX Manager I'm offering the files for download. In a plugin, I'm calling renderResources for the current resource ID, and I'm indeed getting the HTML code that I can then modify before offering it for download. But the HTML code is not complete - the main menu is missing (it's generated by a Wayfinder call).
It's not really a problem in this context as I'd eliminate the menu anyway, but I'd really like to know why this is happening.
The body of the template begins with
<body>
<div class="ym-wrapper">
<div class="ym-wbox">
[[$MainMenu]]
[[$PageHeader]]
<div class="mainContainer">
<div class="ym-column">
Everything can be found in the generated HTML code, including the page header, but, as mentioned before, the main menu is missing. The MainMenu chunk looks like this:
[[!Wayfinder?
&startId=`0`
&level=`2`
&where=`[{"id:<=":7},{"OR:parent:>":0,"AND:parent:<=":7}]`
&hideSubMenus=`0`
&cacheResults=`1`
&titleOfLinks=`description`
&sortBy=`menuindex`
&outerTpl=`menuOuterList`
&innerTpl=`menuInnerList`
&rowTpl=`menuItem`
&hereTpl=`menuItemCurrent`
&innerRowTpl=`subMenuItem`
&innerHereTpl=`subMenuItemCurrent`
&outerClass=`megamenu`
&innerClass=`dropdown_fullwidth`
&rowClass=`menuItem`
&levelClass=`navLevel`
&parentClass=`isSubmenu megamenu_drop`
&firstClass=`firstMenuItem`
&lastClass=`lastMenuItem`
&hereClass=`menuItemOpen`
&selfClass=`menuItemActive`
&webLinkClass=`isWeblink`
]]
The outer template (menuOuterList) contains the following lines:
<!-- Start main (top) navigation -->
<nav id="mainNav" class="ym-hlist megamenu_container megamenu_light_bar megamenu_light">
<a href="/" id="logoLink"><img src="assets/images/design/logo-400x58.png" width="400" height="58" alt="Logo" /></a>
<ul[[+wf.classes]] id="navigation">
[[+wf.wrapper]] </ul>
</nav>
<!-- End main (top) navigation -->
The menu works perfectly when the normal page is displayed, but there's no hint of it in the code generated by renderResources.
Any ideas?
Cheers,
Jan
[ed. note: enigmatic_user last edited this post 10 years, 7 months ago.]