[opencms-dev] change page type

Georgi Naplatanov gosho at oles.biz
Fri Jan 4 13:11:10 CET 2013


Hi all.

Another solution may be updating resource type into database.

Something like :

update cms_offline_resources
set resource_type = value_you_wish
where resource_id in ( select resource_id from cms_offline_structure 
where resource_path = be_careful_with_underscore_value and resource_type 
= old_value)

HTH

Best regards
Georgi

On 01/04/2013 01:44 PM, Antonio Cordeddu wrote:
>
> Hi Praveen,
>
> do you mean change "Content type"? In this case I don't know any admin
> tool to make the change in one shoot.
> When I had to change the content type for many resources I used this
> work-around:
>
> 1) Add a mapping for resource type in WEB-INF\config\opencms-modules.xml
> configuration file
>
> /  <resourcetypes>
> //    <type class="org.opencms.file.types.CmsResourceTypeXmlContent"  name="yourcontenttype"  id="yourid">
> //          <mappings>
> //           <mapping suffix=".yoursuffix"  />
> //         </mappings>
> ...
> </resourcestypes>
> /
>
>
> 2) Export your contents
> 3) Change the suffix of your contents to /yoursuffix/
> 4) Import the contents. OpenCms recognizes the type and assigns the
> correct content type.
>
> If the extension of your files is html (or htm or txt) you have to
> modify the opencms-vfs.xml configuration file, because the "*.html"
> files are mapped to resource type "plain". (you can find more details on
> http://lists.opencms.org/pipermail/opencms-dev/2010q4/034997.html).
>
>
> Hope this is useful for you
> Antonio
>
>
> On 03/01/2013 13.49, p r a v e e n wrote:
>> Hi,
>>
>> Is it possible to change "page type" using Admin tools ? We need to
>> change more than 50 files to a different page type. we can do it
>> manually. but is it possible using Admin tools ?
>>
>> --
>> Cheers,
>> Praveen
>>
>>
>> _______________________________________________
>> 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/cgi-bin/mailman/listinfo/opencms-dev
>>
>>
>>
>
>
> _______________________________________
> Coranto informatica di Antonio Cordeddu
> Via Torricelli, 9 09047 Selargius (CA)
> antoniocordeddu at coranto.it  <mailto:antoniocordeddu at coranto.it>
> Skype: antonio.cordeddu
> http://www.coranto.it
> _______________________________________
>
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



More information about the opencms-dev mailing list