Question about the meaning of "Layout" and "Templates" in the Content application

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about the meaning of "Layout" and "Templates" in the Content application

Jacopo Cappellato
Hi all,

I'm trying to fix some of the issues in the Content application (for
example https://issues.apache.org/jira/browse/OFBIZ-263) but I'm facing
some problems because I don't quite understand the meaning of some terms.
For example: what are "Layout" and "Templates"? What is a "CompDoc"? I
think that they are special types of content but I'm not sure.
Is there a document/thread or something that I can look at to get more
information?

Thanks for any help,

Jacopo
Reply | Threaded
Open this post in threaded view
|

Re: Question about the meaning of "Layout" and "Templates" in the Content application

David E Jones-2

I believe a few descriptions of the CompDoc stuff were sent out to  
the mailing lists as they were developed and contributed. A search of  
that should get you some quick results.

Unless you're seeing something I'm not aware of a Template is just a  
template. The Layout editor thing is meant to edit a template Content  
whose dataResourceId points to the template text (in FTL) and then  
uses ContentAssoc records to tie it to things that will be inserted  
in different parts of the template. So, a given template can be used  
for multiple layouts, each with it's own content inserted in the  
different places.

This was intended to be a starting point for a web content management  
system to make it easier to maintain sites and such, or content in an  
ecommerce site or whatever. The templating stuff could be used for  
XSL:FO as well for "managed" content there, but the original intent  
was for web content which is why it does a wrapped preview in the  
browser on the main layout editor screen so you can edit/replace  
content in each section of the layout page, etc.

I designed this a long time ago as part of a project for a client and  
outsourced the work to Al Byers who did the initial implementation.  
It was developed to the point where it was sufficient for them, and  
then hasn't really seen any attention since except a little bit of  
maintenance and modernization here and there, like the stuff you did  
recently Jacopo.

It would be great to see this developed out and turned into something  
that could be used to manage custom product pages, policy pages,  
sales/marketing content, etc.

-David


On Dec 5, 2006, at 6:34 AM, Jacopo Cappellato wrote:

> Hi all,
>
> I'm trying to fix some of the issues in the Content application  
> (for example https://issues.apache.org/jira/browse/OFBIZ-263) but  
> I'm facing some problems because I don't quite understand the  
> meaning of some terms.
> For example: what are "Layout" and "Templates"? What is a  
> "CompDoc"? I think that they are special types of content but I'm  
> not sure.
> Is there a document/thread or something that I can look at to get  
> more information?
>
> Thanks for any help,
>
> Jacopo

Reply | Threaded
Open this post in threaded view
|

Re: Question about the meaning of "Layout" and "Templates" in the Content application

Jacopo Cappellato
David,

thanks for the insight, it really helps me; please see my comments inline:

David E Jones wrote:
>
> I believe a few descriptions of the CompDoc stuff were sent out to the
> mailing lists as they were developed and contributed. A search of that
> should get you some quick results.
>

Thanks, I will do some researches.

> Unless you're seeing something I'm not aware of a Template is just a
> template.

So, the definition of a "template" is a Content entry of type
"TEMPLATE"; is this correct? This means that in the "Find Layout" and
"List Layout" screens (not sure about the difference between them)
should only show the Content entries of type = TEMPLATE.

> The Layout editor thing is meant to edit a template Content
> whose dataResourceId points to the template text (in FTL) and then uses
> ContentAssoc records to tie it to things that will be inserted in
> different parts of the template. So, a given template can be used for
> multiple layouts, each with it's own content inserted in the different
> places.
>

Are the demo data in
http://svn.apache.org/repos/asf/incubator/ofbiz/trunk/applications/content/data/TemplateData.xml
a good example of how templates should be setup?
I cannot see in it any content of "TEMPLATE" type, nor any ContentAssoc
entries... Is there a good example of demo data for a template
(including Content/ContentAssoc/DataResource entries)?

Thanks,

Jacopo

> This was intended to be a starting point for a web content management
> system to make it easier to maintain sites and such, or content in an
> ecommerce site or whatever. The templating stuff could be used for
> XSL:FO as well for "managed" content there, but the original intent was
> for web content which is why it does a wrapped preview in the browser on
> the main layout editor screen so you can edit/replace content in each
> section of the layout page, etc.
>
> I designed this a long time ago as part of a project for a client and
> outsourced the work to Al Byers who did the initial implementation. It
> was developed to the point where it was sufficient for them, and then
> hasn't really seen any attention since except a little bit of
> maintenance and modernization here and there, like the stuff you did
> recently Jacopo.
>
> It would be great to see this developed out and turned into something
> that could be used to manage custom product pages, policy pages,
> sales/marketing content, etc.
>
> -David
>
>
> On Dec 5, 2006, at 6:34 AM, Jacopo Cappellato wrote:
>
>> Hi all,
>>
>> I'm trying to fix some of the issues in the Content application (for
>> example https://issues.apache.org/jira/browse/OFBIZ-263) but I'm
>> facing some problems because I don't quite understand the meaning of
>> some terms.
>> For example: what are "Layout" and "Templates"? What is a "CompDoc"? I
>> think that they are special types of content but I'm not sure.
>> Is there a document/thread or something that I can look at to get more
>> information?
>>
>> Thanks for any help,
>>
>> Jacopo


Reply | Threaded
Open this post in threaded view
|

Re: Question about the meaning of "Layout" and "Templates" in the Content application

byersa
Jacopo,

I should be able to answer those questions, but it has been so long
since I have touched it. But I am going to be returning to the land of
the living soon - I am quitting my day job and going back to work on
OFBiz full-time as of Jan. Tomorrow morning I am going to start a
content management task, so I should be able to come up to speed then.
I would be happy to work with you on any improvements to CMS.

I wrote the TemplateData.xml file - I think, but I can't remember
where it was used. I will try to refresh my memory on it, but I think
we would want to do future "templating" with widgets - since most of
it will be dragging divs around. But then I have been away from it for
a while.

-Al
Reply | Threaded
Open this post in threaded view
|

Hindi Ofbiz....

Chandresh Turakhia
In reply to this post by Jacopo Cappellato
Dear all ,

Has anyone tried to localization for non-Latin languages. Hindi e.g.

Just help me 1 page localization setup for Hindi. Rest my team will do the rest.

Hopefully we can try to open source the same to apache.

Anyone interested.

Chand
Computer Linguistics Evangalist.
Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

Jacques Le Roux
Administrator
Hi Chandresh,

As far as I know there is nothing in Hindi right now and I don't much about it (if any).
But there are chinese files (like framework/common/config/CommonUiLabels_zh.properties), does it help ?

Of course I will be happy to commit your work. Here are some tips that may help you :

Install Eclipse IDE : http://www.eclipse.org/downloads/
Install ResourceBundle Editor (RBE) see here : http://ofbizwiki.go-integral.com/Wiki.jsp?page=EclipsePlugins
Install Subversion (svn) plugin in Eclipse aka Subclipse :  http://subclipse.tigris.org/
Link to the repository with Subclipse help : http://incubator.apache.org/ofbiz/svn.html
Make a project from this repository with Subclipse (Check Out)
At this point you should be able to do any translation with *ease* (RBE will create new *_hi_IN.properties.file automatically for
you)

Jacques

----- Original Message -----
From: "Chandresh Turakhia" <[hidden email]>
To: <[hidden email]>
Cc: "Anuraag Awasthi" <[hidden email]>; "Anil Gajwani (Anil Gajwani)" <[hidden email]>
Sent: Wednesday, December 06, 2006 7:37 AM
Subject: Hindi Ofbiz....


Dear all ,

Has anyone tried to localization for non-Latin languages. Hindi e.g.

Just help me 1 page localization setup for Hindi. Rest my team will do the rest.

Hopefully we can try to open source the same to apache.

Anyone interested.

Chand
Computer Linguistics Evangalist.

Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

rajsaini
In reply to this post by Chandresh Turakhia
Chand,

I am also interested in doing it and looking forward to start on it very
soon. I will let you know when I have one or two page ready.

Regards,

Raj

Chandresh Turakhia wrote:

> Dear all ,
>
> Has anyone tried to localization for non-Latin languages. Hindi e.g.
>
> Just help me 1 page localization setup for Hindi. Rest my team will do the rest.
>
> Hopefully we can try to open source the same to apache.
>
> Anyone interested.
>
> Chand
> Computer Linguistics Evangalist.
>  

Reply | Threaded
Open this post in threaded view
|

Re: Question about the meaning of "Layout" and "Templates" in the Content application

David E Jones-2
In reply to this post by Jacopo Cappellato

On Dec 5, 2006, at 10:42 PM, Jacopo Cappellato wrote:

> David,
>
> thanks for the insight, it really helps me; please see my comments  
> inline:
>
> David E Jones wrote:
>> I believe a few descriptions of the CompDoc stuff were sent out to  
>> the mailing lists as they were developed and contributed. A search  
>> of that should get you some quick results.
>
> Thanks, I will do some researches.
>
>> Unless you're seeing something I'm not aware of a Template is just  
>> a template.
>
> So, the definition of a "template" is a Content entry of type  
> "TEMPLATE"; is this correct? This means that in the "Find Layout"  
> and "List Layout" screens (not sure about the difference between  
> them) should only show the Content entries of type = TEMPLATE.

This is tricky... Looking at the data and code briefly what I though  
this was doing is not quite what it is doing. I guess it is looking  
at content associated with the Content record with ID  
"TEMPLATE_MASTER". I'm not sure doing it this way is the best idea...  
I like the idea of doing it be a type better than by an association  
with a certain record. If there are too many of that type, then we  
should move to only a find screen or something to handle the volume.

>> The Layout editor thing is meant to edit a template Content whose  
>> dataResourceId points to the template text (in FTL) and then uses  
>> ContentAssoc records to tie it to things that will be inserted in  
>> different parts of the template. So, a given template can be used  
>> for multiple layouts, each with it's own content inserted in the  
>> different places.
>
> Are the demo data in http://svn.apache.org/repos/asf/incubator/ 
> ofbiz/trunk/applications/content/data/TemplateData.xml
> a good example of how templates should be setup?
> I cannot see in it any content of "TEMPLATE" type, nor any  
> ContentAssoc entries... Is there a good example of demo data for a  
> template (including Content/ContentAssoc/DataResource entries)?

It looks like this has some of the basic stuff, almost more seed data  
plus who knows what data. It would be great to have a real example of  
this stuff.

The ContentAssoc with a map key pattern that is used to fill in place  
holders in a template is a pretty common one. That is used for  
rendering sub-content as well, like in the "policies" screen in  
CommonScreens.xml in the ecommerce component.

Anyway, those are some general thoughts that are hopefully helpful.  
It's great to see some more attention going into this.

-David

Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

Si Chen-2
In reply to this post by rajsaini
Take a look at this it should tell you how translations are done:
http://www.opensourcestrategies.com/ofbiz/internationalizing_ofbiz.php

On Dec 5, 2006, at 11:33 PM, Raj Saini wrote:

> Chand,
>
> I am also interested in doing it and looking forward to start on it  
> very soon. I will let you know when I have one or two page ready.
>
> Regards,
>
> Raj
>
> Chandresh Turakhia wrote:
>> Dear all ,
>>
>> Has anyone tried to localization for non-Latin languages. Hindi e.g.
>>
>> Just help me 1 page localization setup for Hindi. Rest my team  
>> will do the rest.
>>
>> Hopefully we can try to open source the same to apache.
>>
>> Anyone interested.
>>
>> Chand
>> Computer Linguistics Evangalist.
>>

Best Regards,

Si
[hidden email]



Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

Chandresh Turakhia
In reply to this post by Chandresh Turakhia
Thanks. was very useful

We tested with french it worked, just changed startofbiz.bat
     
java parameter to fr

   Can some please be requested to guide me to the person
who worked on chinese or japanese but he also might have
faced the same issue since it is non-Latin languages.

I was guided from another group to do following for Indic
languages ( Indian ) localization. Do I need to this also
for database.

 

1. Create a Oracle9i database having UTF8 characterset.

2. Use NVACHAR datatype to stotes the Unicode data i.e.
Hindi Data. For storing this data you have to set-up your
front-end / client accordingly...

3. Using NVARCHAR datatype will use the Database National
Character Set for storage and it will store Multi-byte
characters in less storage.

4. Once your data is stored, you can not see them via sql+
like we use for English characters. For that, you have to
use isql+. You need to configure that.

5. The best part is that, configuring database in above
character set also stores ENGLISH....as well as Mutibyte
character sets like HINDI, Japanese, etc.



> Take a look at this it should tell you how translations
are done:
>
http://www.opensourcestrategies.com/ofbiz/internationalizing_ofbiz.php
>
> On Dec 5, 2006, at 11:33 PM, Raj Saini wrote:
>
> > Chand,
> >
> > I am also interested in doing it and looking forward to
start on it  
> > very soon. I will let you know when I have one or two
page ready.
> >
> > Regards,
> >
> > Raj
> >
> > Chandresh Turakhia wrote:
> >> Dear all ,
> >>
> >> Has anyone tried to localization for non-Latin
languages. Hindi e.g.
> >>
> >> Just help me 1 page localization setup for Hindi. Rest
my team  

> >> will do the rest.
> >>
> >> Hopefully we can try to open source the same to apache.
> >>
> >> Anyone interested.
> >>
> >> Chand
> >> Computer Linguistics Evangalist.
> >>
>
> Best Regards,
>
> Si
> [hidden email]
>
>
>
>


----------------------------------------------------------
http://www.bhartitelesoft.com
Telecommunication and E-Commerce solutions for the future.


Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

Shi Yusen
I will change the source code of OFBiz for the Chinese localization
soon. The current i18n method is a standard way but incovenient in real
deployments.

I'll try to add something like this:
String localeString = new
String(theStringGetFromPropertyFile.getBytes("ISO-8859-1"), "UTF-8");

In this way, the format such as /u8888 can be avoided. The property file
will be readable and easy to edit.

Regards,

Shi Yusen/Beijing Langhua Ltd.


在 2006-12-06三的 17:10 +0000,chand.turakhia@bhartitelesoft.com写道:

> Thanks. was very useful
>
> We tested with french it worked, just changed startofbiz.bat
>      
> java parameter to fr
>
>    Can some please be requested to guide me to the person
> who worked on chinese or japanese but he also might have
> faced the same issue since it is non-Latin languages.
>
> I was guided from another group to do following for Indic
> languages ( Indian ) localization. Do I need to this also
> for database.
>
>  
>
> 1. Create a Oracle9i database having UTF8 characterset.
>
> 2. Use NVACHAR datatype to stotes the Unicode data i.e.
> Hindi Data. For storing this data you have to set-up your
> front-end / client accordingly...
>
> 3. Using NVARCHAR datatype will use the Database National
> Character Set for storage and it will store Multi-byte
> characters in less storage.
>
> 4. Once your data is stored, you can not see them via sql+
> like we use for English characters. For that, you have to
> use isql+. You need to configure that.
>
> 5. The best part is that, configuring database in above
> character set also stores ENGLISH....as well as Mutibyte
> character sets like HINDI, Japanese, etc.
>
>
>
> > Take a look at this it should tell you how translations
> are done:
> >
> http://www.opensourcestrategies.com/ofbiz/internationalizing_ofbiz.php
> >
> > On Dec 5, 2006, at 11:33 PM, Raj Saini wrote:
> >
> > > Chand,
> > >
> > > I am also interested in doing it and looking forward to
> start on it  
> > > very soon. I will let you know when I have one or two
> page ready.
> > >
> > > Regards,
> > >
> > > Raj
> > >
> > > Chandresh Turakhia wrote:
> > >> Dear all ,
> > >>
> > >> Has anyone tried to localization for non-Latin
> languages. Hindi e.g.
> > >>
> > >> Just help me 1 page localization setup for Hindi. Rest
> my team  
> > >> will do the rest.
> > >>
> > >> Hopefully we can try to open source the same to apache.
> > >>
> > >> Anyone interested.
> > >>
> > >> Chand
> > >> Computer Linguistics Evangalist.
> > >>
> >
> > Best Regards,
> >
> > Si
> > [hidden email]
> >
> >
> >
> >
>
>
> ----------------------------------------------------------
> http://www.bhartitelesoft.com
> Telecommunication and E-Commerce solutions for the future.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Question about the meaning of "Layout" and "Templates" in the Content application

Jacopo Cappellato
In reply to this post by byersa
Hi Al,

Al Byers wrote:
> Jacopo,
>
> I should be able to answer those questions, but it has been so long
> since I have touched it. But I am going to be returning to the land of
> the living soon - I am quitting my day job and going back to work on
> OFBiz full-time as of Jan. Tomorrow morning I am going to start a
> content management task, so I should be able to come up to speed then.
> I would be happy to work with you on any improvements to CMS.
>

This is a good news! Right now I actually don't have big plans around
the Content component, but I'd like to fix the biggest bugs and clean up
a bit of artifacts to make it easier for the ones interested to continue
the work done so far.

> I wrote the TemplateData.xml file - I think, but I can't remember
> where it was used. I will try to refresh my memory on it, but I think
> we would want to do future "templating" with widgets - since most of
> it will be dragging divs around. But then I have been away from it for
> a while.

I see what you mean; in my opinion, instead of having a lot of similar
examples it would be nice (in general) to have just one or two (maybe
complex and full working) examples... but I know that the content area
is very complex and it is not easy to do so.

Thanks for your help,

Jacopo

>
> -Al

Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

rajsaini
In reply to this post by Chandresh Turakhia
Chand,

For localization of the UI, your localized string will be stored in the
resource bundles and Java localization principle should apply. For
internationalization of application (translation of your contents), your
database must support Unicode.

Thanks,

Raj
[hidden email] wrote:

> Thanks. was very useful
>
> We tested with french it worked, just changed startofbiz.bat
>      
> java parameter to fr
>
>    Can some please be requested to guide me to the person
> who worked on chinese or japanese but he also might have
> faced the same issue since it is non-Latin languages.
>
> I was guided from another group to do following for Indic
> languages ( Indian ) localization. Do I need to this also
> for database.
>
>  
>
> 1. Create a Oracle9i database having UTF8 characterset.
>
> 2. Use NVACHAR datatype to stotes the Unicode data i.e.
> Hindi Data. For storing this data you have to set-up your
> front-end / client accordingly...
>
> 3. Using NVARCHAR datatype will use the Database National
> Character Set for storage and it will store Multi-byte
> characters in less storage.
>
> 4. Once your data is stored, you can not see them via sql+
> like we use for English characters. For that, you have to
> use isql+. You need to configure that.
>
> 5. The best part is that, configuring database in above
> character set also stores ENGLISH....as well as Mutibyte
> character sets like HINDI, Japanese, etc.
>
>
>
>  
>> Take a look at this it should tell you how translations
>>    
> are done:
>  
> http://www.opensourcestrategies.com/ofbiz/internationalizing_ofbiz.php
>  
>> On Dec 5, 2006, at 11:33 PM, Raj Saini wrote:
>>
>>    
>>> Chand,
>>>
>>> I am also interested in doing it and looking forward to
>>>      
> start on it  
>  
>>> very soon. I will let you know when I have one or two
>>>      
> page ready.
>  
>>> Regards,
>>>
>>> Raj
>>>
>>> Chandresh Turakhia wrote:
>>>      
>>>> Dear all ,
>>>>
>>>> Has anyone tried to localization for non-Latin
>>>>        
> languages. Hindi e.g.
>  
>>>> Just help me 1 page localization setup for Hindi. Rest
>>>>        
> my team  
>  
>>>> will do the rest.
>>>>
>>>> Hopefully we can try to open source the same to apache.
>>>>
>>>> Anyone interested.
>>>>
>>>> Chand
>>>> Computer Linguistics Evangalist.
>>>>
>>>>        
>> Best Regards,
>>
>> Si
>> [hidden email]
>>
>>
>>
>>
>>    
>
>
> ----------------------------------------------------------
> http://www.bhartitelesoft.com
> Telecommunication and E-Commerce solutions for the future.
>
>
>
>  

Reply | Threaded
Open this post in threaded view
|

Re: Hindi Ofbiz....

Chandresh Turakhia
Thanks,

Shall setup Window based Hindi and Oracle with Unicode by friday. Hope the
process is smooth

Chand

----- Original Message -----
From: "Raj Saini" <    >
To: <[hidden email]>
Sent: Wednesday, December 06, 2006 11:42 PM
Subject: Re: Hindi Ofbiz....


> Chand,
>
> For localization of the UI, your localized string will be stored in the
> resource bundles and Java localization principle should apply. For
> internationalization of application (translation of your contents), your
> database must support Unicode.
>
> Thanks,
>
> Raj
> [hidden email] wrote:
>> Thanks. was very useful
>>
>> We tested with french it worked, just changed startofbiz.bat
>>      java parameter to fr
>>
>>    Can some please be requested to guide me to the person
>> who worked on chinese or japanese but he also might have
>> faced the same issue since it is non-Latin languages.
>>
>> I was guided from another group to do following for Indic
>> languages ( Indian ) localization. Do I need to this also
>> for database.
>>
>>
>> 1. Create a Oracle9i database having UTF8 characterset.
>> 2. Use NVACHAR datatype to stotes the Unicode data i.e.
>> Hindi Data. For storing this data you have to set-up your
>> front-end / client accordingly...
>> 3. Using NVARCHAR datatype will use the Database National
>> Character Set for storage and it will store Multi-byte
>> characters in less storage.
>> 4. Once your data is stored, you can not see them via sql+
>> like we use for English characters. For that, you have to
>> use isql+. You need to configure that.
>> 5. The best part is that, configuring database in above
>> character set also stores ENGLISH....as well as Mutibyte
>> character sets like HINDI, Japanese, etc.
>>
>>
>>
>>> Take a look at this it should tell you how translations
>>>
>> are done:
>>   http://www.opensourcestrategies.com/ofbiz/internationalizing_ofbiz.php
>>
>>> On Dec 5, 2006, at 11:33 PM, Raj Saini wrote:
>>>
>>>
>>>> Chand,
>>>>
>>>> I am also interested in doing it and looking forward to
>>>>
>> start on it
>>>> very soon. I will let you know when I have one or two
>>>>
>> page ready.
>>
>>>> Regards,
>>>>
>>>> Raj
>>>>
>>>> Chandresh Turakhia wrote:
>>>>
>>>>> Dear all ,
>>>>>
>>>>> Has anyone tried to localization for non-Latin
>>>>>
>> languages. Hindi e.g.
>>
>>>>> Just help me 1 page localization setup for Hindi. Rest
>>>>>
>> my team
>>>>> will do the rest.
>>>>>
>>>>> Hopefully we can try to open source the same to apache.
>>>>>
>>>>> Anyone interested.
>>>>>
>>>>> Chand
>>>>> Computer Linguistics Evangalist.
>>>>>
>>>>>
>>> Best Regards,
>>>
>>> Si
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>
>>
>> ----------------------------------------------------------
>> http://www.bhartitelesoft.com
>> Telecommunication and E-Commerce solutions for the future.
>>
>>
>>
>>
>
>