So, as I asked the board before - I have successfully gotten content
pages to display and skinned most portions of one of the ofbiz instances
I'm currently working on. The process as I documented it looked kinda
like this:
1. Go to Content->Content->Create New
2. Fill Out form for "App Content Root"
--- Document
--- Content Name - App Content Root
3. Click Create
4. Go to Content->DataResource-> Create New
5. Fill out form
--- Data Resource Type Id = Long Text
--- Locale - en_US
--- Resource Name - FAQ (for example)
--- MIME Type Id - text/html
6. Click Create
7. Fill out electronic text
8. Go to Content->Content->Create New (again)
9. Fill Out form
--- Document
--- Content Name - FAQ
--- Locale - en_US
--- MIME - text/html
10. Go to Content->Content->Edit Content (on App Content Root)
11. Add Association - fill out form
--- Content ID to - ID of FAQ Content
--- Content Assoc Type Id - Sub Section
--- Map Key - FAQ
12. Click Create
13. Go to CommonScreens.xml
14. Create FAQ from login using the assoc-name of FAQ to get that Map ID
from the root ID of 10001
15. Go to controller.xml
16. Add request-map and view map for FAQ
<request-map uri="FAQ">
<security https="false" auth="false"/>
<response name="success" type="view" value="FAQ"/>
</request-map>
<view-map name="FAQ" type="screen"
page="component://app/widget/CommonScreens.xml#FAQ"/>
Under widgets in the CommonScreens.xml#FAQ I use this to load the content:
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<sub-content content-id="10001" assoc-name="FAQ" />
</decorator-section>
</decorator-screen>
This got me a page that displayed perfectly. My question at this
juncture is how do you make it so that content page has multiple
configurable pieces of content (for example META information, policy
information, sidebar content, etc) that can be displayed throughout the
screen? I know basically how to handle this on the eCommerce side of
the app, but I'm just a little confused on the static side.
Do I just need to play with the decorator and add another section and
associate it the same way this body piece was? Is there a way to
associate a "Page" (like FAQ) with multiple pieces of content so that
you only have to tell it which top level Map Key to use and it will sort
out?
Anyways, I'll keep playing around with the options I mentioned below,
but anyone with any insight.
Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com
o:801.649.6594
f:801.649.6595