Variables in Widget Dynamic Configuration?

I'm trying to implement a  core_v2_forumLookup Property Template  in a custom widget but I would like the available forums in the lookup to be scoped only to the group where the widget is placed. I saw the property parentGroupId and when I hard code that to my testing group id it works as expected in limiting the scope. However trying to get it in context using variants of $core_v2_group.Current.Id doesn't seem to be able to retrieve it.

So:

  1. Are variables allowed in Dynamic Configuration templates?
  2. If yes, is there a better method to get the current group id  into parentGroupId than $core_v2_group.Current.Id?
Parents
  •   - Here is the (sanitized) custom widget that I wrote based off of generic content. The idea is to have text that is shown to most forums in a group, but one forum in the group has alternate text on the Add Post page (as a side bar). The alternate forum is chosen from the configuration of the widget and ideally the search query would be limited to the current contextual group of the Add Page configuration for the forums.

    <scriptedContentFragments>
    	<scriptedContentFragment name="${resource:CF_PostingTipsAlt}" version="12.0.2.17146" description="${resource:CF_PostingTipsDesc}" instanceIdentifier="5c3e180f065c4ac693df00c8b65eee1a" theme="" isCacheable="false" varyCacheByUser="false" showHeaderByDefault="true" cssClass="html-content" lastModified="2021-09-24 18:16:33Z">
    		<contentScript language="Velocity"><![CDATA[$core_v2_page.AddLink('stylesheet', $core_v2_widget.GetExecutedFileUrl('style.less'), "%{ Position = 'AfterTheme' }")
    
    #set($altForum = $core_v2_widget.GetCustomValue('altForum', ''))
    #set($currentId = $core_v2_forum.Current.Id)
    #set($isalt = false)
    #if ($altForum == "Forum=$currentId")
        #set ($isalt = true)
    #end
    
    #set($html = false)
    #set($html = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('rhtml','')))
    #set($fhtml = false)
    #set($fhtml = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('fhtml','')))
    #set($backgroundColor = false)
    #set($backgroundColor = $core_v2_widget.GetColorValue('backgroundColor', ''))
    #set($backgroundImage = false)
    #set($backgroundImage = $core_v2_widget.GetUrlValue('backgroundImage', ''))
    #set($height = false)
    #set($height = $core_v2_widget.GetUnitValue('height', ''))
    #set($width = $core_v2_widget.GetStringValue('width', 'page'))
    
    #if (!$html || $html == '')
    	$core_v2_widget.Hide()
    #end
    #if ($isalt)
        #if (!$fhtml || $fhtml == '')
    	$core_v2_widget.Hide()
        #end
    #end
    #if ($width == 'windowpage')
    	<div id="$core_v2_widget.UniqueId('content')" class="outer-wrapper" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		<div class="inner-wrapper user-defined-markup">
    			#if ($isalt) $fhtml #else $html #end
    		</div>
    	</div>
    #else
    	<div id="$core_v2_widget.UniqueId('content')" class="#if ($width == 'window') outer-wrapper inner-wrapper #end user-defined-markup" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		#if ($isalt) $fhtml #else $html #end
    	</div>
    #end
    #if ($width == 'window' || $width == 'windowpage')
    	#registerEndOfPageHtml()
    		<script type="text/javascript">
    			jQuery(function() {
    				var elm = jQuery('#$core_v2_widget.UniqueId('content')');
    				elm.parent().height(elm.outerHeight(true));
    				jQuery(window).trigger('resize');
    				elm.on('resized', function() {
    					elm.parent().height(elm.outerHeight(true));
    					jQuery(window).trigger('resize');
    				});
    			});
    		</script>
    	#end
    #end]]></contentScript>
    		<headerScript language="Velocity"><![CDATA[$core_v2_widget.ApplyTokens($core_v2_widget.GetStringValue('title', '${resource:CF_PostingTips}'))]]></headerScript>
    		<configuration><![CDATA[<propertyGroup id="group0" labelResourceName="AltForum">
        <property id="altForum" labelResourceName="altForumSelection" descriptionResourceName="altForumSelectionDesc" dataType="Custom" template="core_v2_forumLookup" enableCurrentForum="false" maxForumSelections="1" enableGroupSelection="false"  parentGroupId="" format="query" />
    </propertyGroup>
    <propertyGroup id="group1" labelResourceName="Options">
    	<property id="title" labelResourceName="CF_Title" defaultValue="${resource:CF_PostingTipsAlt}" dataType="String" template="core_v2_tokenizedString" />
    	<property id="rhtml" labelResourceName="CF_RegContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    	<property id="fhtml" labelResourceName="CF_AltContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    </propertyGroup>
    <propertyGroup id="group2" labelResourceName="Style">
    	<property id="backgroundColor" labelResourceName="CF_BackgroundColor" dataType="Color" />
    	<property id="backgroundImage" labelResourceName="CF_BackgroundImage" dataType="Url" validExtensions="gif,jpg,jpeg,png">
    		<propertyRule name="extensionvalidation" validExtensions="gif,jpg,jpeg,png" />
    	</property>
    	<property id="height" labelResourceName="Height" dataType="Unit" />
    	<property id="width" labelResourceName="Width" defaultValue="page" dataType="String">
    		<propertyValue value="page" labelResourceName="Width_PageWidth" />
    		<propertyValue value="windowpage" labelResourceName="Width_WindowContentPageWidth" />
    		<propertyValue value="window" labelResourceName="Width_WindowWidth" />
    	</property>
    	<property id="cssClass" labelResourceName="CF_CssClass" descriptionResourceName="CF_CssClass_Description" dataType="String" />
    </propertyGroup>]]></configuration>
    		<languageResources><![CDATA[<language key="en-us">
      <resource name="AltForum">Alternate Text Forum Selection</resource>
      <resource name="altForumSelection">Alternate Text Forum</resource>
      <resource name="altForumSelectionDesc">Select the Alternate Text Forum for this group. If none, leave blank.</resource>
      <resource name="CF_AltContent">Alternate Forum Content</resource>
      <resource name="CF_BackgroundColor">Background Color</resource>
      <resource name="CF_BackgroundImage">Background Image</resource>
      <resource name="CF_CssClass">CSS Class</resource>
      <resource name="CF_CssClass_Description">This class name is applied to the wrapper for the content, enabling targeting from custom CSS rules.</resource>
      <resource name="CF_PostingTips">Posting Tips</resource>
      <resource name="CF_PostingTipsAlt">Posting Tips with Alternate Text</resource>
      <resource name="CF_PostingTipsDesc">Displays Tips for Posting</resource>
      <resource name="CF_RegContent">Regular Forum Content</resource>
      <resource name="CF_Title">Shared Widget Title</resource>
      <resource name="Height">Height</resource>
      <resource name="Options">Options</resource>
      <resource name="Style">Style</resource>
      <resource name="Width">Width</resource>
      <resource name="Width_PageWidth">Page width</resource>
      <resource name="Width_WindowContentPageWidth">Background at window width, content at page width</resource>
      <resource name="Width_WindowWidth">Window width</resource>
    </language>]]></languageResources>
    		<additionalCssScript language="Velocity"><![CDATA[$core_v2_widget.GetStringValue('cssClass', '')]]></additionalCssScript>
    		<files>
    			<file name="style.less">LmNvbnRlbnQtZnJhZ21lbnQuaHRtbC1jb250ZW50IHsKCS5vdXRlci13cmFwcGVyIHsKCQlwb3NpdGlvbjogYWJzb2x1dGU7CgkJbGVmdDogMDsKCQlyaWdodDogMDsKCQk+IC5pbm5lci13cmFwcGVyIHsKCQkJbWFyZ2luLWxlZnQ6IGF1dG87CgkJCW1hcmdpbi1yaWdodDogYXV0bzsKCQkJLy9taW4td2lkdGg6IC1ldm8tdGhlbWVjb25maWctdW5pdCgnbWluV2lkdGgnLCA2NzBweCk7CgkJCW1heC13aWR0aDogLWV2by10aGVtZWNvbmZpZy11bml0KCdtYXhXaWR0aCcsIDEwNjBweCk7CgkJCXBhZGRpbmctbGVmdDogMTBweDsKCQkJcGFkZGluZy1yaWdodDogMTBweDsKCQl9Cgl9Cn0=</file>
    		</files>
    	</scriptedContentFragment>
    </scriptedContentFragments>

    If I hard code the "parentGroupId" parameter of the query, it works fine. I can't get it to dynamically limit its query based on where it is.

  • While it is true that the core_v2_forumLookup property template does not support contextually filtering to a group, a new forum selection template can be created to implement the logic you want.

    The adjustment to your widget below adds a drop-down to select the alternate forum from the list of forums in the current group. It uses a widget-embedded property template to implement this behavior. Notice that this custom implementation uses the contextual group to list forums when it is available and will fallback to listing the first 100 forums when a group context is not available (for example, when selecting to edit a page from the page list in Manage Theme when a valid context is not available to edit the page within).

    Specifically:

    • This uses the embedded selectforum-template.vm file as the template instead of core_v2_forumLookup
    • The implementation of the forum selection in selectforum-template.vm is used to render the property UI for the forum selection configuration option and makes use of the contextual group.
    • The selectforum-template.vm file saves the selected forum by ID directly so the check within the Content script was updated to not check against the query encoded format.

    <scriptedContentFragments>
    	<scriptedContentFragment name="${resource:CF_PostingTipsAlt}" version="12.0.0.0" description="${resource:CF_PostingTipsDesc}" instanceIdentifier="5c3e180f065c4ac693df00c8b65eee1a" theme="" isCacheable="false" varyCacheByUser="false" showHeaderByDefault="true" cssClass="html-content" lastModified="2021-09-24 21:02:15Z">
    		<contentScript language="Velocity"><![CDATA[$core_v2_page.AddLink('stylesheet', $core_v2_widget.GetExecutedFileUrl('style.less'), "%{ Position = 'AfterTheme' }")
    
    #set($altForum = $core_v2_widget.GetCustomValue('altForum', ''))
    #set($currentId = $core_v2_forum.Current.Id)
    #set($isalt = false)
    #if ($altForum == $currentId)
        #set ($isalt = true)
    #end
    
    #set($html = false)
    #set($html = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('rhtml','')))
    #set($fhtml = false)
    #set($fhtml = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('fhtml','')))
    #set($backgroundColor = false)
    #set($backgroundColor = $core_v2_widget.GetColorValue('backgroundColor', ''))
    #set($backgroundImage = false)
    #set($backgroundImage = $core_v2_widget.GetUrlValue('backgroundImage', ''))
    #set($height = false)
    #set($height = $core_v2_widget.GetUnitValue('height', ''))
    #set($width = $core_v2_widget.GetStringValue('width', 'page'))
    
    #if (!$html || $html == '')
    	$core_v2_widget.Hide()
    #end
    #if ($isalt)
        #if (!$fhtml || $fhtml == '')
    	$core_v2_widget.Hide()
        #end
    #end
    #if ($width == 'windowpage')
    	<div id="$core_v2_widget.UniqueId('content')" class="outer-wrapper" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		<div class="inner-wrapper user-defined-markup">
    			#if ($isalt) $fhtml #else $html #end
    		</div>
    	</div>
    #else
    	<div id="$core_v2_widget.UniqueId('content')" class="#if ($width == 'window') outer-wrapper inner-wrapper #end user-defined-markup" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		#if ($isalt) $fhtml #else $html #end
    	</div>
    #end
    #if ($width == 'window' || $width == 'windowpage')
    	#registerEndOfPageHtml()
    		<script type="text/javascript">
    			jQuery(function() {
    				var elm = jQuery('#$core_v2_widget.UniqueId('content')');
    				elm.parent().height(elm.outerHeight(true));
    				jQuery(window).trigger('resize');
    				elm.on('resized', function() {
    					elm.parent().height(elm.outerHeight(true));
    					jQuery(window).trigger('resize');
    				});
    			});
    		</script>
    	#end
    #end]]></contentScript>
    		<headerScript language="Velocity"><![CDATA[$core_v2_widget.ApplyTokens($core_v2_widget.GetStringValue('title', '${resource:CF_PostingTips}'))]]></headerScript>
    		<configuration><![CDATA[<propertyGroup id="group0" labelResourceName="AltForum">
        <property id="altForum" labelResourceName="altForumSelection" descriptionResourceName="altForumSelectionDesc" dataType="Custom" template="selectforum-template.vm" />
    </propertyGroup>
    <propertyGroup id="group1" labelResourceName="Options">
    	<property id="title" labelResourceName="CF_Title" defaultValue="${resource:CF_PostingTipsAlt}" dataType="String" template="core_v2_tokenizedString" />
    	<property id="rhtml" labelResourceName="CF_RegContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    	<property id="fhtml" labelResourceName="CF_AltContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    </propertyGroup>
    <propertyGroup id="group2" labelResourceName="Style">
    	<property id="backgroundColor" labelResourceName="CF_BackgroundColor" dataType="Color" />
    	<property id="backgroundImage" labelResourceName="CF_BackgroundImage" dataType="Url" validExtensions="gif,jpg,jpeg,png">
    		<propertyRule name="extensionvalidation" validExtensions="gif,jpg,jpeg,png" />
    	</property>
    	<property id="height" labelResourceName="Height" dataType="Unit" />
    	<property id="width" labelResourceName="Width" defaultValue="page" dataType="String">
    		<propertyValue value="page" labelResourceName="Width_PageWidth" />
    		<propertyValue value="windowpage" labelResourceName="Width_WindowContentPageWidth" />
    		<propertyValue value="window" labelResourceName="Width_WindowWidth" />
    	</property>
    	<property id="cssClass" labelResourceName="CF_CssClass" descriptionResourceName="CF_CssClass_Description" dataType="String" />
    </propertyGroup>]]></configuration>
    		<languageResources><![CDATA[<language key="en-us">
      <resource name="AltForum">Alternate Text Forum Selection</resource>
      <resource name="altForumSelection">Alternate Text Forum</resource>
      <resource name="altForumSelectionDesc">Select the Alternate Text Forum for this group. If none, leave blank.</resource>
      <resource name="CF_AltContent">Alternate Forum Content</resource>
      <resource name="CF_BackgroundColor">Background Color</resource>
      <resource name="CF_BackgroundImage">Background Image</resource>
      <resource name="CF_CssClass">CSS Class</resource>
      <resource name="CF_CssClass_Description">This class name is applied to the wrapper for the content, enabling targeting from custom CSS rules.</resource>
      <resource name="CF_PostingTips">Posting Tips</resource>
      <resource name="CF_PostingTipsAlt">Posting Tips with Alternate Text</resource>
      <resource name="CF_PostingTipsDesc">Displays Tips for Posting</resource>
      <resource name="CF_RegContent">Regular Forum Content</resource>
      <resource name="CF_Title">Shared Widget Title</resource>
      <resource name="Height">Height</resource>
      <resource name="Options">Options</resource>
      <resource name="Style">Style</resource>
      <resource name="Width">Width</resource>
      <resource name="Width_PageWidth">Page width</resource>
      <resource name="Width_WindowContentPageWidth">Background at window width, content at page width</resource>
      <resource name="Width_WindowWidth">Window width</resource>
    </language>]]></languageResources>
    		<additionalCssScript language="Velocity"><![CDATA[$core_v2_widget.GetStringValue('cssClass', '')]]></additionalCssScript>
    		<files>
    			<file name="selectforum-template.vm">I3NldCgkdmFsdWUgPSAnJykKI3NldCgkdmFsdWUgPSAkY29udGV4dF92Ml9wcm9wZXJ0eVRlbXBsYXRlLlZhbHVlKQoKI3NldCgkZ3JvdXAgPSBmYWxzZSkKI3NldCgkZ3JvdXAgPSAkY29yZV92Ml9ncm91cC5DdXJyZW50KQoKI3NldCgkZm9ydW1zID0gZmFsc2UpCiNpZiAoJGdyb3VwKQogICAgI3NldCgkZm9ydW1zID0gJGNvcmVfdjJfZm9ydW0uTGlzdCgiJXsgR3JvdXBJZD0kZ3JvdXAuSWQsIEluY2x1ZGVTdWJHcm91cHM9J0ZhbHNlJywgUGFnZVNpemU9MTAwLCBQYWdlSW5kZXg9MCwgU29ydEJ5PSdOYW1lJyB9IikpCiNlbHNlCiAgICAjc2V0KCRmb3J1bXMgPSAkY29yZV92Ml9mb3J1bS5MaXN0KCIleyBQYWdlU2l6ZT0xMDAsIFBhZ2VJbmRleD0wLCBTb3J0Qnk9J05hbWUnIH0iKSkKI2VuZAoKPHNlbGVjdCBpZD0iJHtjb250ZXh0X3YyX3Byb3BlcnR5VGVtcGxhdGUuVW5pcXVlSWR9X2ZvcnVtIj4KICAgIDxvcHRpb24gdmFsdWU9IiI+PC9vcHRpb24+CiAgICAjZm9yZWFjaCgkZm9ydW0gaW4gJGZvcnVtcykKICAgICAgICA8b3B0aW9uIHZhbHVlPSIkZm9ydW0uSWQiICNpZiAoJHZhbHVlID09ICRmb3J1bS5JZCkgc2VsZWN0ZWQgI2VuZD4kZm9ydW0uTmFtZTwvb3B0aW9uPgogICAgI2VuZAo8L3NlbGVjdD4KCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KJChmdW5jdGlvbigpIHsKICAgIHZhciBhcGkgPSAkY29udGV4dF92Ml9wcm9wZXJ0eVRlbXBsYXRlLkpzb25BcGk7CiAgICB2YXIgb3B0aW9ucyA9ICQoJyMke2NvbnRleHRfdjJfcHJvcGVydHlUZW1wbGF0ZS5VbmlxdWVJZH1fZm9ydW0nKTsKICAgICAKICAgIGFwaS5yZWdpc3Rlcih7CiAgICAgICBoYXNWYWx1ZTogZnVuY3Rpb24oKSB7IAogICAgICAgICAgIHZhciB2YWwgPSBvcHRpb25zLnZhbCgpOwogICAgICAgICAgIGlmICghdmFsIHx8IHZhbC5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgfQogICAgICAgfSwKICAgICAgIHZhbDogZnVuY3Rpb24odmFsKSB7CiAgICAgICAgICAgaWYgKHZhbCA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgIHJldHVybiBvcHRpb25zLnZhbCgpOwogICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgIG9wdGlvbnMudmFsKHZhbCk7CiAgICAgICAgICAgfQogICAgICAgfQogICAgfSk7CiAgICAKICAgIG9wdGlvbnMub24oJ2NoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgIGFwaS5jaGFuZ2VkKG9wdGlvbnMudmFsKCkpOwogICAgfSk7Cn0pOwo8L3NjcmlwdD4=</file>
    			<file name="style.less">LmNvbnRlbnQtZnJhZ21lbnQuaHRtbC1jb250ZW50IHsKCS5vdXRlci13cmFwcGVyIHsKCQlwb3NpdGlvbjogYWJzb2x1dGU7CgkJbGVmdDogMDsKCQlyaWdodDogMDsKCQk+IC5pbm5lci13cmFwcGVyIHsKCQkJbWFyZ2luLWxlZnQ6IGF1dG87CgkJCW1hcmdpbi1yaWdodDogYXV0bzsKCQkJLy9taW4td2lkdGg6IC1ldm8tdGhlbWVjb25maWctdW5pdCgnbWluV2lkdGgnLCA2NzBweCk7CgkJCW1heC13aWR0aDogLWV2by10aGVtZWNvbmZpZy11bml0KCdtYXhXaWR0aCcsIDEwNjBweCk7CgkJCXBhZGRpbmctbGVmdDogMTBweDsKCQkJcGFkZGluZy1yaWdodDogMTBweDsKCQl9Cgl9Cn0=</file>
    		</files>
    	</scriptedContentFragment>
    </scriptedContentFragments>

    For more documentation about customizing property UIs, see:  Embedding a custom user interface for a configuration property  

Reply
  • While it is true that the core_v2_forumLookup property template does not support contextually filtering to a group, a new forum selection template can be created to implement the logic you want.

    The adjustment to your widget below adds a drop-down to select the alternate forum from the list of forums in the current group. It uses a widget-embedded property template to implement this behavior. Notice that this custom implementation uses the contextual group to list forums when it is available and will fallback to listing the first 100 forums when a group context is not available (for example, when selecting to edit a page from the page list in Manage Theme when a valid context is not available to edit the page within).

    Specifically:

    • This uses the embedded selectforum-template.vm file as the template instead of core_v2_forumLookup
    • The implementation of the forum selection in selectforum-template.vm is used to render the property UI for the forum selection configuration option and makes use of the contextual group.
    • The selectforum-template.vm file saves the selected forum by ID directly so the check within the Content script was updated to not check against the query encoded format.

    <scriptedContentFragments>
    	<scriptedContentFragment name="${resource:CF_PostingTipsAlt}" version="12.0.0.0" description="${resource:CF_PostingTipsDesc}" instanceIdentifier="5c3e180f065c4ac693df00c8b65eee1a" theme="" isCacheable="false" varyCacheByUser="false" showHeaderByDefault="true" cssClass="html-content" lastModified="2021-09-24 21:02:15Z">
    		<contentScript language="Velocity"><![CDATA[$core_v2_page.AddLink('stylesheet', $core_v2_widget.GetExecutedFileUrl('style.less'), "%{ Position = 'AfterTheme' }")
    
    #set($altForum = $core_v2_widget.GetCustomValue('altForum', ''))
    #set($currentId = $core_v2_forum.Current.Id)
    #set($isalt = false)
    #if ($altForum == $currentId)
        #set ($isalt = true)
    #end
    
    #set($html = false)
    #set($html = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('rhtml','')))
    #set($fhtml = false)
    #set($fhtml = $core_v2_ui.Render($core_v2_widget.GetHtmlValue('fhtml','')))
    #set($backgroundColor = false)
    #set($backgroundColor = $core_v2_widget.GetColorValue('backgroundColor', ''))
    #set($backgroundImage = false)
    #set($backgroundImage = $core_v2_widget.GetUrlValue('backgroundImage', ''))
    #set($height = false)
    #set($height = $core_v2_widget.GetUnitValue('height', ''))
    #set($width = $core_v2_widget.GetStringValue('width', 'page'))
    
    #if (!$html || $html == '')
    	$core_v2_widget.Hide()
    #end
    #if ($isalt)
        #if (!$fhtml || $fhtml == '')
    	$core_v2_widget.Hide()
        #end
    #end
    #if ($width == 'windowpage')
    	<div id="$core_v2_widget.UniqueId('content')" class="outer-wrapper" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		<div class="inner-wrapper user-defined-markup">
    			#if ($isalt) $fhtml #else $html #end
    		</div>
    	</div>
    #else
    	<div id="$core_v2_widget.UniqueId('content')" class="#if ($width == 'window') outer-wrapper inner-wrapper #end user-defined-markup" style="#if($backgroundColor && $backgroundColor != '')background-color: $backgroundColor;#end#if($backgroundImage && $backgroundImage != '')background-image:url('$core_v2_encoding.HtmlAttributeEncode($backgroundImage)');#end#if($height && $height != '')height:$height;#end">
    		#if ($isalt) $fhtml #else $html #end
    	</div>
    #end
    #if ($width == 'window' || $width == 'windowpage')
    	#registerEndOfPageHtml()
    		<script type="text/javascript">
    			jQuery(function() {
    				var elm = jQuery('#$core_v2_widget.UniqueId('content')');
    				elm.parent().height(elm.outerHeight(true));
    				jQuery(window).trigger('resize');
    				elm.on('resized', function() {
    					elm.parent().height(elm.outerHeight(true));
    					jQuery(window).trigger('resize');
    				});
    			});
    		</script>
    	#end
    #end]]></contentScript>
    		<headerScript language="Velocity"><![CDATA[$core_v2_widget.ApplyTokens($core_v2_widget.GetStringValue('title', '${resource:CF_PostingTips}'))]]></headerScript>
    		<configuration><![CDATA[<propertyGroup id="group0" labelResourceName="AltForum">
        <property id="altForum" labelResourceName="altForumSelection" descriptionResourceName="altForumSelectionDesc" dataType="Custom" template="selectforum-template.vm" />
    </propertyGroup>
    <propertyGroup id="group1" labelResourceName="Options">
    	<property id="title" labelResourceName="CF_Title" defaultValue="${resource:CF_PostingTipsAlt}" dataType="String" template="core_v2_tokenizedString" />
    	<property id="rhtml" labelResourceName="CF_RegContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    	<property id="fhtml" labelResourceName="CF_AltContent" dataType="Html" contentTypeId="DF237622-6CC3-4FC2-8555-EF4FB2656444" enableRichEditing="true" />
    </propertyGroup>
    <propertyGroup id="group2" labelResourceName="Style">
    	<property id="backgroundColor" labelResourceName="CF_BackgroundColor" dataType="Color" />
    	<property id="backgroundImage" labelResourceName="CF_BackgroundImage" dataType="Url" validExtensions="gif,jpg,jpeg,png">
    		<propertyRule name="extensionvalidation" validExtensions="gif,jpg,jpeg,png" />
    	</property>
    	<property id="height" labelResourceName="Height" dataType="Unit" />
    	<property id="width" labelResourceName="Width" defaultValue="page" dataType="String">
    		<propertyValue value="page" labelResourceName="Width_PageWidth" />
    		<propertyValue value="windowpage" labelResourceName="Width_WindowContentPageWidth" />
    		<propertyValue value="window" labelResourceName="Width_WindowWidth" />
    	</property>
    	<property id="cssClass" labelResourceName="CF_CssClass" descriptionResourceName="CF_CssClass_Description" dataType="String" />
    </propertyGroup>]]></configuration>
    		<languageResources><![CDATA[<language key="en-us">
      <resource name="AltForum">Alternate Text Forum Selection</resource>
      <resource name="altForumSelection">Alternate Text Forum</resource>
      <resource name="altForumSelectionDesc">Select the Alternate Text Forum for this group. If none, leave blank.</resource>
      <resource name="CF_AltContent">Alternate Forum Content</resource>
      <resource name="CF_BackgroundColor">Background Color</resource>
      <resource name="CF_BackgroundImage">Background Image</resource>
      <resource name="CF_CssClass">CSS Class</resource>
      <resource name="CF_CssClass_Description">This class name is applied to the wrapper for the content, enabling targeting from custom CSS rules.</resource>
      <resource name="CF_PostingTips">Posting Tips</resource>
      <resource name="CF_PostingTipsAlt">Posting Tips with Alternate Text</resource>
      <resource name="CF_PostingTipsDesc">Displays Tips for Posting</resource>
      <resource name="CF_RegContent">Regular Forum Content</resource>
      <resource name="CF_Title">Shared Widget Title</resource>
      <resource name="Height">Height</resource>
      <resource name="Options">Options</resource>
      <resource name="Style">Style</resource>
      <resource name="Width">Width</resource>
      <resource name="Width_PageWidth">Page width</resource>
      <resource name="Width_WindowContentPageWidth">Background at window width, content at page width</resource>
      <resource name="Width_WindowWidth">Window width</resource>
    </language>]]></languageResources>
    		<additionalCssScript language="Velocity"><![CDATA[$core_v2_widget.GetStringValue('cssClass', '')]]></additionalCssScript>
    		<files>
    			<file name="selectforum-template.vm">I3NldCgkdmFsdWUgPSAnJykKI3NldCgkdmFsdWUgPSAkY29udGV4dF92Ml9wcm9wZXJ0eVRlbXBsYXRlLlZhbHVlKQoKI3NldCgkZ3JvdXAgPSBmYWxzZSkKI3NldCgkZ3JvdXAgPSAkY29yZV92Ml9ncm91cC5DdXJyZW50KQoKI3NldCgkZm9ydW1zID0gZmFsc2UpCiNpZiAoJGdyb3VwKQogICAgI3NldCgkZm9ydW1zID0gJGNvcmVfdjJfZm9ydW0uTGlzdCgiJXsgR3JvdXBJZD0kZ3JvdXAuSWQsIEluY2x1ZGVTdWJHcm91cHM9J0ZhbHNlJywgUGFnZVNpemU9MTAwLCBQYWdlSW5kZXg9MCwgU29ydEJ5PSdOYW1lJyB9IikpCiNlbHNlCiAgICAjc2V0KCRmb3J1bXMgPSAkY29yZV92Ml9mb3J1bS5MaXN0KCIleyBQYWdlU2l6ZT0xMDAsIFBhZ2VJbmRleD0wLCBTb3J0Qnk9J05hbWUnIH0iKSkKI2VuZAoKPHNlbGVjdCBpZD0iJHtjb250ZXh0X3YyX3Byb3BlcnR5VGVtcGxhdGUuVW5pcXVlSWR9X2ZvcnVtIj4KICAgIDxvcHRpb24gdmFsdWU9IiI+PC9vcHRpb24+CiAgICAjZm9yZWFjaCgkZm9ydW0gaW4gJGZvcnVtcykKICAgICAgICA8b3B0aW9uIHZhbHVlPSIkZm9ydW0uSWQiICNpZiAoJHZhbHVlID09ICRmb3J1bS5JZCkgc2VsZWN0ZWQgI2VuZD4kZm9ydW0uTmFtZTwvb3B0aW9uPgogICAgI2VuZAo8L3NlbGVjdD4KCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4KJChmdW5jdGlvbigpIHsKICAgIHZhciBhcGkgPSAkY29udGV4dF92Ml9wcm9wZXJ0eVRlbXBsYXRlLkpzb25BcGk7CiAgICB2YXIgb3B0aW9ucyA9ICQoJyMke2NvbnRleHRfdjJfcHJvcGVydHlUZW1wbGF0ZS5VbmlxdWVJZH1fZm9ydW0nKTsKICAgICAKICAgIGFwaS5yZWdpc3Rlcih7CiAgICAgICBoYXNWYWx1ZTogZnVuY3Rpb24oKSB7IAogICAgICAgICAgIHZhciB2YWwgPSBvcHRpb25zLnZhbCgpOwogICAgICAgICAgIGlmICghdmFsIHx8IHZhbC5sZW5ndGggPT0gMCkgewogICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgfQogICAgICAgfSwKICAgICAgIHZhbDogZnVuY3Rpb24odmFsKSB7CiAgICAgICAgICAgaWYgKHZhbCA9PT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgIHJldHVybiBvcHRpb25zLnZhbCgpOwogICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgIG9wdGlvbnMudmFsKHZhbCk7CiAgICAgICAgICAgfQogICAgICAgfQogICAgfSk7CiAgICAKICAgIG9wdGlvbnMub24oJ2NoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgIGFwaS5jaGFuZ2VkKG9wdGlvbnMudmFsKCkpOwogICAgfSk7Cn0pOwo8L3NjcmlwdD4=</file>
    			<file name="style.less">LmNvbnRlbnQtZnJhZ21lbnQuaHRtbC1jb250ZW50IHsKCS5vdXRlci13cmFwcGVyIHsKCQlwb3NpdGlvbjogYWJzb2x1dGU7CgkJbGVmdDogMDsKCQlyaWdodDogMDsKCQk+IC5pbm5lci13cmFwcGVyIHsKCQkJbWFyZ2luLWxlZnQ6IGF1dG87CgkJCW1hcmdpbi1yaWdodDogYXV0bzsKCQkJLy9taW4td2lkdGg6IC1ldm8tdGhlbWVjb25maWctdW5pdCgnbWluV2lkdGgnLCA2NzBweCk7CgkJCW1heC13aWR0aDogLWV2by10aGVtZWNvbmZpZy11bml0KCdtYXhXaWR0aCcsIDEwNjBweCk7CgkJCXBhZGRpbmctbGVmdDogMTBweDsKCQkJcGFkZGluZy1yaWdodDogMTBweDsKCQl9Cgl9Cn0=</file>
    		</files>
    	</scriptedContentFragment>
    </scriptedContentFragments>

    For more documentation about customizing property UIs, see:  Embedding a custom user interface for a configuration property  

Children