[opencms-dev] always publish resourceb.html when resourcea.html is published

a.westermann at alkacon.com a.westermann at alkacon.com
Wed Jul 15 15:12:31 CEST 2009


Hi John,

some more keywords: In this case you are still able to write a module 
action class that registers an event handler in it's init hook that 
listens for modification events and uses the Content Relationship API 
(CmsObject.getRElationsForResource...) to touch also the related files 
whenever the relating file is modified.


Kind Regards,
Achim.

-------------------
Achim Westermann

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org


Gute Kunden:

Achim Westermann

-------------------

Alkacon Software GmbH - The OpenCms Experts
Achim Westermann
An der Wachsfabrik 13
50996 Koeln, DE

Tel: +49 (0)2236 3826-12
Fax: +49 (0)2236 3826-20
Email: a.westermann at alkacon.com

http://www.alkacon.com
http://www.opencms.org


Marc Johnen wrote:
> I've only gotten close to what I need. Actually I want resourceb.html 
> to always be published when resourcea.html was published.
> Right now resourceb.html it will only be published when it has been
> changed. I need it to always be published when resourcea.html is
> published no matter if resourceb.html has been changed or not.
> 
> Here are the parts of my xsd:
> 
> <xsd:sequence>
> ...
> <xsd:element name="header_images" type="OpenCmsVfsFile" minOccurs="0"
> maxOccurs="1" />  
> ...
> </xsd:sequence>
>  <xsd:annotation>
>   <xsd:appinfo>
> ...
>     <relations>
>            <relation element="header_images" type="strong"
> invalidate="true"/>
>     </relations>  
> ...
> 
> 
> I add the link of resourceb.html in resourcea.html .
> 
> Thank you
> Marc Johnen
> 
> 
> Marc Johnen wrote:
>> Thank you Achim. With the right keywords you mentioned I found
>> a nice tutorial on
>> http://pomegranate.de:9000/cms/forum/viewthread?thread=119
>> and defined a relation in my xsd.
>> Greetings
>> Marc Johnen
>>
>>
>> a.westermann at alkacon.com wrote:
>>> Hi John,
>>>
>>> ideally your recourcea.html is an XML content that has a field 
>>> "SOMELINK" of type OpenCmsVfsFile (or a configured relation in the 
>>> layouts section of the xsd).
>>>
>>> In that example an editor would open resourcea.html, click the folder 
>>> symbol, get a popup to select the target resourceb.html. Behind the 
>>> scenes OpenCms would store a relation from resourcea.html to 
>>> resourceb.html. When publishing the option "publish with related 
>>> resources" then would do what you want.
>>>
>>> Kind Regards,
>>> Achim.
>>>
>>> -------------------
>>> Achim Westermann
>>>
>>> Alkacon Software GmbH  - The OpenCms Experts
>>> http://www.alkacon.com - http://www.opencms.org
>>>
>>>
>>>
>>> Marc Johnen wrote:
>>>> Hello everyone,
>>>>
>>>> I'd like to automatically publish a resourceb.html when resourcea.html
>>>> was
>>>> published.
>>>> I searched arround in the forum and wiki and think that "assign
>>>> categorie"
>>>> is good for that, but had no luck in getting it to work. 
>>>> I'd be happy for any hints how to do this.
>>>>
>>>> Thanks and greetings
>>>> Marc Johnen
>>> _______________________________________________
>>> 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