Looking at the taglib docs, I don't see any requirement that the paragraph needs to be in a contentNodeCollection. Have you thought about trying to attach the paragraph directly to the page? i.e.:

<cms:adminOnly>
<cms:editButton label="Edit Logo" paragraph="np-logo" contentNodeName="logo" />
</cms:adminOnly>

Then the include template tag would become:
<cms:includeTemplate contentNodeName="logo" />

Pure theory at the moment ... I haven't tried this but don't see a reason it wouldn't work. Otherwise what you've done seems to be the best solution.

--David

Amir Mistric wrote:

Hi

I have several paragraphs on the page which I want to keep in the JCR under 
certain collection.
So I have something like this


...
...html
...
        <cms:adminOnly>
                <cms:editButton label="Edit Logo" paragraph="np-logo" 
contentNodeCollectionName="headerParagraphs" contentNodeName="logo"/>
</cms:adminOnly> <cms:ifNotExisting contentNodeCollectionName="headerParagraphs" contentNodeName="logo">
       <a href="http://www.google.com"; class="noborder" title="Google"><img 
src="${resourcePath}/image/logo/google-logo.jpg" alt="Google" width="251" height="77" /></a>
   </cms:ifNotExisting>
   <cms:ifExisting contentNodeCollectionName="headerParagraphs" 
contentNodeName="logo">
       <cms:includeTemplate contentNodeName="headerParagraphs/logo" />
   </cms:ifExisting>
...
...more html
...
        <cms:adminOnly>
                <cms:editButton label="Edit Breadcrumbs" paragraph="np-navigation-breadcrumb" 
contentNodeCollectionName="headerParagraphs" contentNodeName="breadcrumb"/>
   </cms:adminOnly>
   <cms:ifNotExisting contentNodeCollectionName="headerParagraphs" 
contentNodeName="breadcrumb">
       &amp;nbsp;
   </cms:ifNotExisting>
   <cms:ifExisting contentNodeCollectionName="headerParagraphs" 
contentNodeName="breadcrumb">
           <cms:includeTemplate contentNodeName="headerParagraphs/breadcrumb" />
</cms:ifExisting>

So as you can see I have a "headerParagraphs" collection that has 2 content nodes ("logo" 
and "breadcrumbs") and each has several node data items.


The question I have is regarding <cms:includeTemplate contentNodeName="headerParagraphs/logo" />. Since it does not have contentNodeCollectionName attribute I am passing a whole path to the content node I wish to manipulate...


This works fine, but is there a better way or is this allowed (using a whole 
path)...

Thanks
Amir

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


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

Reply via email to