I have a .ftl page that I include in all of my pages. It does nothing more than
display all of the elements in a Collection:
[code][@cms.mainBar dialog="myDialog" label="Page Properties"
adminButtonVisible=true /]
...
[#assign items=mgnl.inherit(content).myCollection /]
[#list items?children as kid]
[@cms.includeTemplate contentNode=kid /]
[/#list]
[@cms.newBar contentNodeCollectionName="myCollection" paragraph="myElement"
/][/code]
The problem is, this code displays the Edit / Move / Delete and New bars on
every page. I only want to display them on one page, the Home page. The reason
is, since Magnolia creates the Collection and associates it to the page you
added it from, if, for example, someone clicks on New from the Home page, and
then clicks on New in the Events page, the items are created in two distinct
Collections: Home->myCollection and Events->myCollections.
My idea was to use the current url and do something like:
if (currentUrl == '/home') {
show Edit / Move / Delete and New bars
}
The only problem is, the code used to display the items in the Collection
([@cms.includeTemplate contentNode=kid /]) seems to be the same code that
display the Edit / Move / Delete and New bars. I thought that the [cms:edit]
tag was the only way to display the Edit bar but I guess I am wrong.
So, is there a way to display the items in my Collection and conditionally not
display the Edit / Move / Delete and New bars?
Many thanks!
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=f52806a1-a8d1-4005-a3c0-774028cfd75f
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------