[ 
https://issues.apache.org/jira/browse/OFBIZ-5682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14175982#comment-14175982
 ] 

Anil K Patel commented on OFBIZ-5682:
-------------------------------------

We have various ways to model content assoc for example, 

    <!-- Add css file links to HHEAD -->
    <DataResource dataResourceId="BOOTSTRAP_MIN_CSS" dataResourceTypeId="LINK" 
objectInfo="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css";
 mimeTypeId="text/css"/>
    <Content contentId="BOOTSTRAP_MIN_CSS" contentTypeId="DOCUMENT" 
contentName="Bootstrap compiled and minified CSS" 
dataResourceId="BOOTSTRAP_MIN_CSS"/>
    <ContentAssoc contentId="DSITE_HHEAD" contentIdTo="BOOTSTRAP_MIN_CSS" 
sequenceNum="1" contentAssocTypeId="SUB_CONTENT" mapKey="stylesheet" 
fromDate="2014-10-02 00:00:00"/>

And then, 
Put code like following in htmlhead file,
                <#assign nothing = thisContent.setMapKeyFilter("stylesheet")/>
                <#list thisContent.subcontent_all as content>
                    <link rel="stylesheet" 
href="<@ofbizContentUrl>${StringUtil.wrapString(content.toString())}</@ofbizContentUrl>"
 type="text/css"/>
                </#list>

I am working on similar idea, to see more complete code, here is link,
https://github.com/ofbizecosystem/evolvingofbiz/blob/trunk/hot-deploy/dcommerce/data/DcommerceSiteData.xml
 


> Hardcoded stylesheets and javascript resources
> ----------------------------------------------
>
>                 Key: OFBIZ-5682
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5682
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/cmssite
>    Affects Versions: Release Branch 11.04, Release Branch 12.04, Release 
> Branch 13.07, Trunk
>            Reporter: Pierre Smits
>            Assignee: Anil K Patel
>
> The 'HtmlHead.ftl' file of the cmssite component contains following hardcoded 
> style sheet and javascript resources:
> * /images/fieldlookup.js
> * /images/selectall.js
> * /images/ecommain.css
> * /ecommerce/images/blog.css
> * /content/images/contentForum.css



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to