如何将 css 应用到在 alfresco web 快速入门中创建的自定义内容
我在露天创建了一个自定义内容模型。此外,我还更新了网络快速入门,以便自定义内容类型出现在文档库中的创建内容下拉列表中。当我单击自定义类型时,会出现一个表单,其中包含所有元数据字段以及内容编辑器。
使用这个我可以创建内容,但它是没有任何 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎 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 filesample.dss
in theroot
folder should work fine.Set mimetype of
sample.dss
toPlain 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" />