{foreach from=$container item='child'}
{if $child->isAvailable()}
{assign var='__tabMenuFormContainerChildId' value=$child->getPrefixedId()|concat:'Container'}
- <li{if !$child->checkDependencies()} style="display: none;"{/if}><a href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}">{@$child->getLabel()}</a></li>
+ <li{if !$child->checkDependencies()} style="display: none;"{/if}><a{if $container->usesAnchors()} href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}"{/if}>{@$child->getLabel()}</a></li>
{/if}
{/foreach}
</ul>
{foreach from=$container item='child'}
{if $child->isAvailable()}
{assign var='__tabMenuFormContainerChildId' value=$child->getPrefixedId()|concat:'Container'}
- <li{if !$child->checkDependencies()} style="display: none;"{/if}><a href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}">{@$child->getLabel()}</a></li>
+ <li{if !$child->checkDependencies()} style="display: none;"{/if}><a{if $container->usesAnchors()} href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}"{/if}>{@$child->getLabel()}</a></li>
{/if}
{/foreach}
</ul>
{foreach from=$container item='child'}
{if $child->isAvailable()}
{assign var='__tabMenuFormContainerChildId' value=$child->getPrefixedId()|concat:'Container'}
- <li{if !$child->checkDependencies()} style="display: none;"{/if}><a href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}">{@$child->getLabel()}</a></li>
+ <li{if !$child->checkDependencies()} style="display: none;"{/if}><a{if $container->usesAnchors()} href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}"{/if}>{@$child->getLabel()}</a></li>
{/if}
{/foreach}
</ul>
{foreach from=$container item='child'}
{if $child->isAvailable()}
{assign var='__tabMenuFormContainerChildId' value=$child->getPrefixedId()|concat:'Container'}
- <li{if !$child->checkDependencies()} style="display: none;"{/if}><a href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}">{@$child->getLabel()}</a></li>
+ <li{if !$child->checkDependencies()} style="display: none;"{/if}><a{if $container->usesAnchors()} href="{@$__wcf->getAnchor($__tabMenuFormContainerChildId)}"{/if}>{@$child->getLabel()}</a></li>
{/if}
{/foreach}
</ul>
*/
protected $templateName = '__tabMenuFormContainer';
+ /**
+ * is `true` if the links in the tab menu have anchors
+ * @var boolean
+ */
+ protected $useAnchors = true;
+
/**
* @inheritDoc
*/
$this->addClass('section')
->addClass('tabMenuContainer');
}
+
+ /**
+ * Sets if the links in the tab menu have anchors and returns this form container.
+ *
+ * @param boolean $useAnchors
+ * @return TabMenuFormContainer this form container
+ */
+ public function useAnchors($useAnchors = true) {
+ $this->useAnchors = $useAnchors;
+
+ return $this;
+ }
+
+ /**
+ * Returns `true` if the links in the tab menu have anchors and `false` otherwise.
+ *
+ * By default, the links in the tab menu have anchors.
+ *
+ * @return boolean
+ */
+ public function usesAnchors() {
+ return $this->useAnchors;
+ }
}