SV: [opencms-dev] How to get XML Content Types to show in list?

Stefan Uldum Grinsted stefan at e-nation.dk
Tue Sep 26 09:30:01 CEST 2006


Hi there.

Just wanted to add a few words to this conversation.

You _can_ register custom file types to your module without having access to
the opencms-modules.xml. You will have to export the module, modify the
manifest.xml with the same modifications as you would put in the
opencms-modules.xml, re-zip and re-import your module.

/ Stefan

-----Oprindelig meddelelse-----
Fra: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] På vegne af Stanczak Group
Sendt: 25. september 2006 16:51
Til: The OpenCms mailing list
Emne: Re: [opencms-dev] How to get XML Content Types to show in list?

I've read the documentation module and didn't see any info on the 
opencms-modules.xml. I'll take a look at these other sources, thanks.

Jonathan Woods wrote:
> 1.  No.
>
> 2.  There's some documentation in the documentation module (which you may
> also be able to find exposed on the web) about creating XSDs etc; and it
may
> cover the opencms-modules.xml changes - I can't recall.  But the sources
> people seem to find most useful are ad hoc tutorials written by Alexander
> Kandzior himself
> (http://mail.opencms.org/pipermail/opencms-dev/2004q4/013609.html) and by
> Sebastian Himberger (search at http://www.opencms-forum.de/ for
'himberger'
> and 'xsd' and words like that).
>
> Jon
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Stanczak Group
> Sent: 24 September 2006 23:56
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] How to get XML Content Types to show in list?
>
> Couple questions here. One, can a type be used without putting it in this
> file, if so how? Two, is this in the documents, and I've missed reading
it?
>
> Jonathan Woods wrote:
>   
>> I don't think so, no - opencms-modules.xml is only accessible through 
>> real filespace, and not mapped into the VFS at all.
>>
>> Once you get your access, here are the changes you'll need to make to 
>> opencms-modules.xml.  Restart the server for the changes to take 
>> effect, and keep an eye on the log 
>> (<path.to.opencms.webapp>/WEB-INF/logs/opencms.log)
>> for information about what's going wrong, if anything.
>>
>> 1.  Within the <resourcetypes> node, add this (for an example type
>> 'article'):
>>
>> 		<type
>> class="org.opencms.file.types.CmsResourceTypeXmlContent" name="article"
>> id="80">
>> 			<properties>
>> 				<property>
>> 					<!-- Determines behaviour of editor
>>     
> in outputting contents -->
>   
>> 					<name>content-conversion</name>
>> 					<value type="shared">
>> 						<![CDATA[cleanup;xhtml]]>
>> 					</value>
>> 				</property>
>> 				<property>
>> 					<!--	This property is set to
>> define the JSP used to render the resource when it's invoked by an 
>> incoming request. -->
>> 					<name>template-elements</name>
>> 					<value type="shared">
>> 	
>> <![CDATA[/system/modules/your.module.folder.name.here/template-element
>> s/arti
>> cle.jsp]]>
>> 					</value>
>> 				</property>
>> 			</properties>
>> 			<copy-resources />
>> 			<param
>> name="schema">/system/modules/your.module.folder.name.here/schemas/art
>> icle.x
>> sd</param>
>> 		</type>
>>
>> Make sure the id value (here 80) is unique within this file, and that 
>> you've got all the filepaths, file names etc completely right.
>>
>> 2.  Witin the <explorertypes> node, add this:
>>
>> 		<explorertypes>
>> 			<!-- <scintillance:comment>
>> 				It seems that the icon referred to in the
>>     
> attribute in the 
>   
>> following element must be placed in
>> 				/system/workplace/explorer/filetypes, and
>>     
> it's not possible to 
>   
>> specify an absolute path.  May have
>> 				changed in recent OpenCms versions, but that
>>     
> seemed to be the case 
>   
>> for 6.0.x.
>> 				</scintillance:comment>
>> 			-->
>> 			<explorertype name="article" key="fileicon.article"
>> icon="article.gif" reference="xmlcontent">
>> 				<newresource page="structurecontent"
>> uri="newresource_xmlcontent.jsp?newresourcetype=article"
>> autosetnavigation="false" autosettitle="false" order="54" />
>> 				<accesscontrol>
>> 					<accessentry
>> principal="GROUP.Administrators" permissions="+r+v+w+c" />
>> 					<accessentry
>> principal="GROUP.Projectmanagers" permissions="+r+v+w+c" />
>> 					<accessentry principal="GROUP.Users"
>> permissions="+r+v+w+c" />
>> 				</accesscontrol>
>> 			</explorertype>
>>
>> Again, make sure the paths are all OK, and in particular replace all 
>> instances of 'article' with 'your.content.type.name'.
>>
>> Hope this helps.
>>
>> Jon
>>
>> -----Original Message-----
>> From: opencms-dev-bounces at opencms.org
>> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Stanczak Group
>> Sent: 24 September 2006 22:49
>> To: The OpenCms mailing list
>> Subject: Re: [opencms-dev] How to get XML Content Types to show in list?
>>
>> Can that file be edited without back end server access?
>>
>> Jonathan Woods wrote:
>>   
>>     
>>> I'm sorry; that should have read 'opencms-modules.xml'.  The presence 
>>> of .xsd files in the module's schema directory won't change the 
>>> structured types listed - that's done through the presence of entries 
>>> in the <resourcetypes> and <explorertypes> nodes in the modules 
>>> config
>>>     
>>>       
>> file.
>>   
>>     
>>> J
>>>
>>> -----Original Message-----
>>> From: Jonathan Woods [mailto:jonathan.woods at scintillance.com]
>>> Sent: 24 September 2006 22:42
>>> To: 'The OpenCms mailing list'
>>> Subject: RE: [opencms-dev] How to get XML Content Types to show in list?
>>>
>>> I guess you've edited opencms-system.xml, then?
>>>
>>> Jon
>>>
>>> -----Original Message-----
>>> From: opencms-dev-bounces at opencms.org 
>>> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Stanczak Group
>>> Sent: 24 September 2006 22:38
>>> To: The OpenCms mailing list
>>> Subject: [opencms-dev] How to get XML Content Types to show in list?
>>>
>>> I created a .xsd and put it in my modules schema directory, but it's 
>>> not showing in the list when I create a structured type. What am I 
>>> doing
>>>     
>>>       
>> wrong.
>>   
>>     
>>> I've been over the tutorial several times.
>>>
>>> --
>>> Justin Stanczak
>>> Stanczak Group
>>> 812-735-3600
>>>
>>> "All that is necessary for the triumph of evil is that good men do
>>>     
>>>       
>> nothing."
>>   
>>     
>>> Edmund Burke
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list To change 
>>> your list options, or to unsubscribe from the list, please visit 
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list To change 
>>> your list options, or to unsubscribe from the list, please visit 
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>   
>>>     
>>>       
>> --
>> Justin Stanczak
>> Stanczak Group
>> 812-735-3600
>>
>> "All that is necessary for the triumph of evil is that good men do
>>     
> nothing."
>   
>> Edmund Burke
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list To change 
>> your list options, or to unsubscribe from the list, please visit 
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>
>>
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list To change 
>> your list options, or to unsubscribe from the list, please visit 
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>   
>>     
>
> --
> Justin Stanczak
> Stanczak Group
> 812-735-3600
>
> "All that is necessary for the triumph of evil is that good men do
nothing."
> Edmund Burke
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change your
> list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>   

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list