dotCMS REST API按id获取模板 我考虑使用DOTCM并将其与其他系统集成在REST API中,但是,尽管它的API能够获取内容,但我不能获取DOTCM中定义的Tunes。

dotCMS REST API按id获取模板 我考虑使用DOTCM并将其与其他系统集成在REST API中,但是,尽管它的API能够获取内容,但我不能获取DOTCM中定义的Tunes。,rest,dotcms,Rest,Dotcms,使用urlapi/content/type/xml/id/c12fe7e6-d338-49d5-973b-2d974d57015b <contentlets> <content> <template>1763fa6e-91c0-464e-8b16-9a25d7ae6ce5</template> <modDate>2015-12-10 10:58:56.098</modDate> <cache

使用url
api/content/type/xml/id/c12fe7e6-d338-49d5-973b-2d974d57015b

<contentlets>
  <content>
    <template>1763fa6e-91c0-464e-8b16-9a25d7ae6ce5</template>
    <modDate>2015-12-10 10:58:56.098</modDate>
    <cachettl>15</cachettl>
    <title>About Us</title>
    <httpsreq/>
    <showOnMenu>true</showOnMenu>
    <inode>84e2879a-7749-40f4-bded-9d59dbb2b1da</inode>
    <____DOTNAME____>About Us</____DOTNAME____>
    <disabledWYSIWYG>[]</disabledWYSIWYG>
    <seokeywords>dotCMS Content Management System</seokeywords>
    <host>48190c8c-42c4-46af-8d1a-0cd5db894797</host>
    <lastReview>2015-12-10 10:58:56.093</lastReview>
    <stInode>c541abb1-69b3-4bc5-8430-5e09e5239cc8</stInode>
    <owner>dotcms.org.1</owner>
    <friendlyname>About Us</friendlyname>
    <identifier>c12fe7e6-d338-49d5-973b-2d974d57015b</identifier>
    <redirecturl/>
    <canonicalUrl/>
    <pagemetadata>dotCMS</pagemetadata>
    <languageId>1</languageId>
    <seodescription>
        dotCMS Content Management System demo site - About Quest
    </seodescription>
    <folder>1049e7fe-1553-4731-bdf9-ba069f1dc08b</folder>
    <sortOrder>0</sortOrder>
    <modUser>dotcms.org.1</modUser>
  </content>
</contentlets>

1763fa6e-91c0-464e-8b16-9a25d7ae6ce5
2015-12-10 10:58:56.098
15
关于我们
真的
84e2879a-7749-40f4-bded-9d59dbb2b1da
关于我们
[]
dotCMS内容管理系统
48190c8c-42c4-46af-8d1a-0cd5db894797
2015-12-10 10:58:56.093
c541abb1-69b3-4bc5-8430-5e09e5239cc8
dotcms.org.1
关于我们
c12fe7e6-d338-49d5-973b-2d974d57015b
dotCMS
1.
dotCMS内容管理系统演示站点-关于Quest
1049e7fe-1553-4731-bdf9-ba069f1dc08b
0
dotcms.org.1

有没有可能通过id获取模板(这里是
1763fa6e-91c0-464e-8b16-9a25d7ae6ce5
)并获取html文件作为响应或一些包含html内容的xml?

好的,所以经过几个小时的源代码分析后,我可以假设dotCMS没有实现rest api。我们可以使用JavaAPI,通过调用负责从数据库中获取这些组件的方法来获取这些组件,如模板、容器等。然后我们可以实现自己的rest服务。

dotCMS中的模板控制“页面”的显示,这些页面可以由多个内容对象组成。如果要返回应用了格式的内容对象,请在此处查看小部件API:

以及如何在这里使用它:


我不明白小部件与模板有什么共同之处?是的,我想获得构建模板的html代码。我认为最好的解决方案是用JavaAPI找到模板,然后有一个像GetContainerForTemplate这样的方法,它返回具有html主体的容器。我说得对吗?