Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Widget Selector get homepage node

$
0
0
I want to able to Tag data items. Because it is a multi-site environment, I have a global datatype "Tags" with the fields Title and Site. In the Site field, you can select the Homepage of the site, the Guid is saved. I can now group the tags by Site.
So far so good.

When an editor adds a new item of the type News, he should be able to select one or multiple Tags, but only from the Site he is adding the News to. So I'm trying to make a Markup for the Widget, like this.
<SelectorOptionsSource KeyFieldName="Id" LabelFieldName="Tag">
  <TreeNode>
    <f:param xmlns:f="http://www.composite.net/ns/function/1.0" name="Options">
      <f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="DiD.Tags.Tag.GetTagXml">
        <f:param name="PropertyNames">
          <f:paramelement value="Id" />
          <f:paramelement value="Tag" />
          <f:paramelement value="Site.Id" />
        </f:param>
        <f:param xmlns:f="http://www.composite.net/ns/function/1.0" name="Filter">
            <f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="DiD.Tags.Tag.FieldPredicatesFilter">
              <f:param xmlns:f="http://www.composite.net/ns/function/1.0" name="Site.Id">
                <f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Utils.Predicates.GuidEquals">
                  <f:param xmlns:f="http://www.composite.net/ns/function/1.0" name="Value">
                    <f:function xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Pages.GetPageId">
                      <f:param name="SitemapScope" value="Level1" />
                    </f:function>
                  </f:param>
                </f:function>
              </f:param>
            </f:function>
          </f:param>
        <f:param name="OrderByField" value="Tag" />
      </f:function>
    </f:param>
  </TreeNode>
</SelectorOptionsSource>
I cannot get the correct Filter working. Can anyone help?

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>