cancel
Showing results for 
Search instead for 
Did you mean: 

Webscripts in wcmqs

mizage
Champ in-the-making
Champ in-the-making
I have created the following webscript: section.get.js, section.get.html.ftl and section.get.desc.xml.
In the section.get.js I'm trying to do: 

  var folder = roothome.childByNamePath("path");

I get this error when executing:

ReferenceError: "roothome" is not defined. (/WEB-INF/webscripts/section/section.get.js#5)

Isn't roothome one of the implict objects available?
2 REPLIES 2

bremmington
Champ on-the-rise
Champ on-the-rise
No, there are three root-level objects:  "webSite", "section", and "asset".

Perhaps you want webSite.getSectionByPath("path")?

mizage
Champ in-the-making
Champ in-the-making
Thanks! Basically I'm trying to build some breadcrumb functionality. Looks like section.getPath() might do the trick.