如何在Alfresco中设置输出文件名?

发布于 2024-12-20 11:59:11 字数 1978 浏览 6 评论 0原文

创建

 <type name="dl:car">
     <title>Car List</title>
     <parent>dl:dataListItem</parent>
     <properties>
        <property name="dl:carName">
           <title>Car Name</title>
           <type>d:text</type>
           <mandatory>false</mandatory>
        </property>
        <property name="dl:carCompany">
           <title>Company Name</title>
           <type>d:text</type>
           <mandatory>false</mandatory>
        </property>
     </properties>
  </type>

当我在存储库浏览器中

   <!-- dl:contact type create car form -->
   <config evaluator="model-type" condition="dl:car">
      <forms>
         <!-- Create item form -->
         <form>
            <field-visibility>
               <!-- dl:contact type -->
               <show id="dl:carName" />
               <show id="dl:carCompany" />
            </field-visibility>
            <create-form template="../data-lists/forms/dataitem.ftl" />
         </form>
      </forms>
   </config> 

新车内容时(我后来将菜单配置 添加内容类型“汽车”),文件名为 91b65385-86c6-4923-859d-6ecb3326319c

     <create-content>
         <content id="plain-text" mimetype="text/plain" label="create-content.text" itemid="cm:content" icon="text"/>
         <content id="html" mimetype="text/html"  label="create-content.html" itemid="cm:content"/>
         <content id="xml" mimetype="text/xml" label="create-content.xml" itemid="cm:content"/>
         <content id="car" mimetype="text/xml" icon="xml" label="create-content.car" itemid="dl:car"/>         
      </create-content>

如何将文件名改为 carName 而不是 91b65385-86c6-4923-859d-6ecb3326319c

感谢任何帮助。

I was creating custom content model

in datalistModel.xml

 <type name="dl:car">
     <title>Car List</title>
     <parent>dl:dataListItem</parent>
     <properties>
        <property name="dl:carName">
           <title>Car Name</title>
           <type>d:text</type>
           <mandatory>false</mandatory>
        </property>
        <property name="dl:carCompany">
           <title>Company Name</title>
           <type>d:text</type>
           <mandatory>false</mandatory>
        </property>
     </properties>
  </type>

in share-datalist-form-config.xml

   <!-- dl:contact type create car form -->
   <config evaluator="model-type" condition="dl:car">
      <forms>
         <!-- Create item form -->
         <form>
            <field-visibility>
               <!-- dl:contact type -->
               <show id="dl:carName" />
               <show id="dl:carCompany" />
            </field-visibility>
            <create-form template="../data-lists/forms/dataitem.ftl" />
         </form>
      </forms>
   </config> 

When I create a new car content in repository browser(I later configured menu to add content type 'Car'), the file name is 91b65385-86c6-4923-859d-6ecb3326319c.

     <create-content>
         <content id="plain-text" mimetype="text/plain" label="create-content.text" itemid="cm:content" icon="text"/>
         <content id="html" mimetype="text/html"  label="create-content.html" itemid="cm:content"/>
         <content id="xml" mimetype="text/xml" label="create-content.xml" itemid="cm:content"/>
         <content id="car" mimetype="text/xml" icon="xml" label="create-content.car" itemid="dl:car"/>         
      </create-content>

How can I make the file name to carName instead of 91b65385-86c6-4923-859d-6ecb3326319c

Any kind help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

喵星人汪星人 2024-12-27 11:59:11

看一下默认的“share-datalist-form-config.xml”,

您会发现几乎每种类型都指定

您也可以直接输入 显示名称属性。

为了放置标题,您需要将 cm:titled 方面放入模型中。

只需检查“datalistModel.xml”默认值的定义方式

并检查此博客发布以了解更多如何创建自定义数据列表。

Take a look at the default 'share-datalist-form-config.xml'

You will see that almost every type specify <show id="cm:title" />

You could also just put <show id="name" /> or <show id="cm:name" /> to show the name attribute.

In order to put the title you will need to put the cm:titled aspect in your model.

Just check the 'datalistModel.xml' how the defaults are defined

And check this blog post to know a bit more how to create custom datalists.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文