Author: hansbak
Date: Sun Jan 11 19:36:38 2009
New Revision: 733595
URL: http://svn.apache.org/viewvc?rev=733595&view=rev
Log:
show example of a blog in cmssite
Added:
ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl (with props)
Modified:
ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml
ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/web.xml
ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
Modified: ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml?rev=733595&r1=733594&r2=733595&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml (original)
+++ ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml Sun Jan 11
19:36:38 2009
@@ -79,6 +79,7 @@
<div><a href="/cmssite/cms/CMSS_PPOINT/demoPage1">Demo Page 1
- Hard Coded Link using the Sub-Content Pattern</a></div>
<div><a
href="${thisContent.content.CMSS_DEMO_PAGE1.link}">Demo Page 1 - Dynamic
Link</a></div>
<div><a
href="${thisContent.content.CMSS_DEMO_SCREEN.link}">Demo Page with screen
widget and screen decorator</a></div>
+ <div><a href="${thisContent.content.CMSS_DEMO_BLOG.link}">Demo
Page with belog using screen decorator</a></div>
</div>
]]></textData>
</ElectronicText>
@@ -116,7 +117,11 @@
<Content contentId="CMSS_DEMO_SCREEN" contentTypeId="DOCUMENT"
contentName="CMS Site Demo screen/decorator example"
dataResourceId="CMSS_DEMO_SCREEN"/>
<ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_SCREEN"
contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
-
+ <DataResource dataResourceId="CMSS_DEMO_BLOG"
dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="SCREEN_COMBINED"
objectInfo="component://cmssite/widget/CmssiteScreens.xml#blogScreen"/>
+ <Content contentId="CMSS_DEMO_BLOG" contentTypeId="DOCUMENT"
contentName="CMS Site Demo blog screen example"
dataResourceId="CMSS_DEMO_BLOG"/>
+ <ContentAssoc contentId="CMSS_PPOINT" contentIdTo="CMSS_DEMO_BLOG"
contentAssocTypeId="SUB_CONTENT" fromDate="2001-01-01 00:00:00"/>
+
+
<!--
CmsSite (WebSite)
|___(WebSiteContent of type DEFAULT_PAGE)_____> CMSS_DEMO_HOME (Content
of type DOCUMENT with decorator CMSS_DEC)
Added: ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl?rev=733595&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl (added)
+++ ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl Sun Jan 11
19:36:38 2009
@@ -0,0 +1,26 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+
+<#list blogList as blog>
+ <i><b>${blog.contentName}</b></i>
+ <a
href="ViewArticle?articleContentId=${blog.contentId}&blogContentId=${blogContentId}">[${blog.contentId}]</a><br/>
+ <@renderSubContentCache subContentId=blog.contentId mapKey="SUMMARY"/>
+ <br/><br/>
+</#list>
\ No newline at end of file
Propchange: ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/specialpurpose/cmssite/template/cms/BlogList.ftl
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/web.xml?rev=733595&r1=733594&r2=733595&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/web.xml (original)
+++ ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/web.xml Sun Jan
11 19:36:38 2009
@@ -44,6 +44,11 @@
<param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in
entityengine.xml</description>
</context-param>
+ <context-param>
+ <param-name>mainDecoratorLocation</param-name>
+
<param-value>component://cmssite/widget/CmssiteScreens.xml</param-value>
+ <description>The location of the main-decorator screen to use for this
webapp; referred to as a context variable in screen def XML files.</description>
+ </context-param>
<filter>
<filter-name>ContextFilter</filter-name>
Modified: ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml?rev=733595&r1=733594&r2=733595&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/cmssite/widget/CmssiteScreens.xml Sun Jan 11
19:36:38 2009
@@ -22,6 +22,15 @@
<screen name="main-decorator">
<section>
+ <actions>
+ <property-map resource="EcommerceUiLabels"
map-name="uiLabelMap" global="true"/>
+ <property-map resource="ContentUiLabels" map-name="uiLabelMap"
global="true"/>
+ <property-map resource="CommonUiLabels" map-name="uiLabelMap"
global="true"/>
+ <property-map resource="ProductUiLabels" map-name="uiLabelMap"
global="true"/>
+ <property-map resource="AccountingUiLabels"
map-name="uiLabelMap" global="true"/>
+ <property-map resource="PartyUiLabels" map-name="uiLabelMap"
global="true"/>
+ <property-map resource="OrderUiLabels" map-name="uiLabelMap"
global="true"/>
+ </actions>
<widgets>
<platform-specific><html>
<html-template
location="component://cmssite/template/cms/HtmlHead.ftl"/>
@@ -45,6 +54,34 @@
</widgets>
</section>
</screen>
-
-
+
+ <screen name="blogScreen">
+ <section>
+ <actions>
+ <property-to-field property="blog.view.size"
field="blogViewSize" resource="blog" default="20"/>
+ <set field="blogContentId" value="BLOGROOTMADMAX"/>
+ <entity-condition entity-name="ContentAssocViewTo"
use-cache="false" list-name="blogList">
+ <condition-list combine="and">
+ <condition-expr field-name="contentIdStart"
operator="equals" env-name="blogContentId"/>
+ <condition-expr field-name="caContentAssocTypeId"
operator="equals" value="PUBLISH_LINK"/>
+ <condition-expr field-name="caThruDate"
operator="equals" value=""/>
+ <condition-expr field-name="statusId"
operator="equals" value="CTNT_PUBLISHED"/>
+ </condition-list>
+ <order-by field-name="caFromDate DESC"/>
+ </entity-condition>
+ <set field="viewIndex"
from-field="requestParameters.VIEW_INDEX" type="Integer"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator">
+ <decorator-section name="body">
+ <platform-specific><html>
+ <html-template
location="component://cmssite/template/cms/BlogList.ftl"/>
+ </html></platform-specific>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+
</screens>
\ No newline at end of file