Set isfolder with NewsPublisher

I generate a nested tree menu via WayFinder, with all resources that appear within the menu created via NewsPublisher. I need NewsPublisher to pass isfolder=1 to parent resources (these are designated via template ID).

NewPublisher has certain page setting parameters, but not for isfolder. I’ve tried to set isfolder with &presets, but this doesn’t seem to be processed.

This is the call:

[[!NewsPublisher?
 &initrte=`1`
 &initfilebrowser=`1`
 &published=`1`
 &hidemenu=`0`
 &cssfile=`c_newspublisher.css`
 &parent=`553`
 &postid=`553`
 &template=`26`
 &show=`pagetitle,content,isfolder`
 &presets=`content:pattern-library- [[!+nowdate:default=`now`:strtotime:date=`%Y-%m-%d`]],isfolder:1` 
 &captions=`pagetitle:Pattern Category`
 &outertpl=`c_npOuterTpl-patterns`
 &tinymceinittpl=`c_npTinymceInitTpl`
 &richtexttpl=`c_npRichtextTpl`
]]

Is it possible to set the isfolder value via NewsPublisher, or do I need OnDocFormSave?

The isfolder field is automatic. When the first child resource is saved, the parent’s isfolder field is automatically checked. When the last child is is remove from a folder, its isfolder field is unchecked. AFAIK, there’s no way to override this.

2 Likes

I did not know the setting was added automatically like this. Issue solved. Thank you!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.