如何将 css 应用到在 alfresco web 快速入门中创建的自定义内容

发布于 2024-12-23 00:48:37 字数 222 浏览 1 评论 0原文

我在露天创建了一个自定义内容模型。此外,我还更新了网络快速入门,以便自定义内容类型出现在文档库中的创建内容下拉列表中。当我单击自定义类型时,会出现一个表单,其中包含所有元数据字段以及内容编辑器。

使用这个我可以创建内容,但它是没有任何 CSS 的纯内容。我想复制一个网站,因此我需要与目标网站相同的样式,但我没有找到如何&在网络快速启动中的哪里将自定义样式应用于我的内容以模仿网站?

问候。

I have created a custom content model in alfresco. Also i have updated web quick start so that custom content type comes in create content dropdown in document library. When i click on custom type, a form appears with all metadata fields along with content editor.

Using this i can create content but it is plain content without any css. I want to replicate a website, hence i need same styles as of target website but i am not finding on how & where to apply custom styles to my content in web quick start to mimic the website?

Regards.

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

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

发布评论

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

评论(1

两仪 2024-12-30 00:48:37

似乎 alfresco web 快速启动在设计时并未考虑到这一要求。

然而,如果您想要的是“通过工作流程和复制路由的 CSS”,实现它的快速技巧如下:

  • 在编辑站​​点中上传您的文件。确保它不是 mimetype 文本,并且不在与正则表达式 /(css|js|img|images|swf)/.* 匹配的文件夹中。 mimetype 对于避免行为触发并将类型设置为文章很重要。避免正则表达式匹配是为了确保 webstart 尝试从存储库中获取资源。 root 文件夹中的文件 sample.dss 应该可以正常工作。

  • sample.dss的mimetype设置为纯文本。使用共享中的“编辑属性”对话框。

  • 将以下代码放入head.ftl

    <#assign cssId=webSite.rootSection.getAsset("sample.dss").id?replace(".*/","","r")>

Seems alfresco web quick start was not designed with this requirement in mind.

Nevertheless, if what you want is "css routed through workflow and replication", a quick hack to implement it goes like this:

  • Upload your file in the editorial site. Make sure it is not of mimetype text and not in a folder matching the regular expression /(css|js|img|images|swf)/.*. The mimetype is important to avoid a behaviour firing and setting the type to article. Avoiding the regex match is to make sure webstart tries to pick up the resource from the repo. A file sample.dss in the root folder should work fine.

  • Set mimetype of sample.dss to Plain Text. Use the Edit Properties Dialog in share.

  • Put the folloing code in head.ftl

    <#assign cssId=webSite.rootSection.getAsset("sample.dss").id?replace(".*/","","r")>

    <link rel="stylesheet" href="${url.context}/asset/${cssId}" type="text/css" media="screen" />

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