Finally had a chance to try this. I'm reusing content in the left
column.

The paragraphs defined on the home page are reused, unless you define
unique paragraphs on a particular page, in which case the 'defaults'
don't appear.

Works good except the content in my main column goes away. I suspect
this is because I'm not restoring the original page with 'loadPage'.


I'm doing the usual...

  editBar
  includeTemplate
  newBar

...with...

      <cms:ifEmpty contentNodeCollectionName="leftParagraphs">
        <cms:loadPage path="udhome"/> 
        <cms:contentNodeIterator
contentNodeCollectionName="leftParagraphs"> 
        <cms:includeTemplate />
        </cms:contentNodeIterator>
          <cms:loadPage path="??????????"/>
      </cms:ifEmpty>

...afterwards, which is how Mr. Rozsa implemented this content reuse
concept, except with out the 2nd 'loadPage'.

Maybe his HTML code would drop off afterwards too, but since there's no
content after the right column, he doesn't have a problem.


What should the value of 'path' be to 'restore the original page'?



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 19, 2005 4:26 AM
To: [email protected]
Subject: Re: [magnolia-user] sharing contents

With JSP you should be capable of traversing the whole repository tree
and collect data as you wish.
Also, have a look at the loadPage tag of the cms taglib. With it you can
load an other page and then access its content using the normal tags
(e.g. ContentNodeIterator).

So, frankly, what you do is:
1. Create a page in your site tree called "right_column_content" and
make sure it does not show up in the navigation.
2. In your page templates, at the right column 
3. Just before the right column jsp code loadPage your
"right_column_content" page 
4. iterate through its content 
5. restore the original page (again using loadPage)

I've did this for news content that should show up at several places in
the site tree. I personally think it's rather an ugly hack but I was too
lazy to come up with my own custom tag.

Good luck!

-Will

----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to