Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple SDL Tridion / Web GUI extension to set an advanced publish setting by default.
<?xml version="1.0"?>
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration/Merge"
xmlns:cfg="http://www.sdltridion.com/2009/GUI/Configuration"
xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions"
xmlns:cmenu="http://www.sdltridion.com/2009/GUI/extensions/ContextMenu">
<resources cache="true">
<cfg:filters />
<cfg:extensiongroups>
<cfg:extensiongroup name="SetPublishToChildrenDefault">
<cfg:extension target="Tridion.Web.UI.Controls.RibbonToolbar">
<cfg:insertafter>SetPublishToChildrenDefault</cfg:insertafter>
</cfg:extension>
</cfg:extensiongroup>
</cfg:extensiongroups>
<cfg:groups>
<cfg:group name="SetPublishToChildrenDefault">
<cfg:fileset>
<cfg:file type="script">SetPublishToChildrenDefault.js</cfg:file>
</cfg:fileset>
</cfg:group>
</cfg:groups>
</resources>
<definitionfiles />
<extensions>
<ext:editorextensions/>
<ext:dataextenders/>
</extensions>
<commands />
<contextmenus />
<localization />
<settings>
<defaultpage />
<navigatorurl />
<editurls/>
<listdefinitions/>
<itemicons/>
<theme>
<path/>
<resourcegroup />
</theme>
<resourceextensions>
<resourceextension>SetPublishToChildrenDefault</resourceextension>
</resourceextensions>
<customconfiguration/>
</settings>
</Configuration>
$evt.addEventHandler($display, "start", onPublishPopupOpenToSetPublishDefaultToUnCheckAllTargets);
// Event Handler to check off the advanced publish setting.
function onPublishPopupOpenToSetPublishDefaultToUnCheckAllTargets () {
$evt.removeEventHandler($display, "start", onPublishPopupOpenToSetPublishDefaultToUnCheckAllTargets);
if ($display.getView().getId() == "PublishPopup") {
jQuery("#propagateInChildren").prop("checked", true);
}
}
<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns="http://www.sdltridion.com/2009/GUI/Configuration" xmlns:ext="http://www.sdltridion.com/2009/GUI/extensions">
...
<!-- Editors settings. -->
<editors default="CME">
<!-- Customization -->
<editor name="SetPublishToChildrenDefault">
<installpath>C:\Program Files (x86)\SDL Web\web\WebUI\Editors\SetPublishToChildrenDefault</installpath>
<configuration>SetPublishToChildrenDefault.config</configuration>
<vdir>SetPublishToChildrenDefault</vdir>
</editor>
...
</editors>
...
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.