How to add a slot to global page template?

I have a web site has same right sidebar/snippets on every single page. As a result I added a new slot to navtree content type and added snippets to the slot. The problem now was that it worked fine if a page was at root level but I got an error message say "Error processing slot “rffNav " The template specified by eNewsletterSnSidebar and content type id 314 was not found” if the page is not on the root. What should I change to make it work?

Here’s what I have done

In global template I added following slot. rffNav is a sys_ManagedNavContentFinder slot.
#slot(“rffNav” “” “” “” “” “template=eNewsletterSnSidebar”)

eNesletterSnSidebar is an type specific template that have Navtree as allowed content type. I did this because I wanted have Sidebar_slot show up in navtree assembly table list so I can add snippets to it. In eNewsletterSnSidebar I have something say
#slot(“Sidebar_slot” “” “” “” “” “template=eNewsLetterSnBasic”)

eNewsLetterSnBasic is a type specific template snippet, which is used to format and display content it snippets.

This is explained in this thread:

http://forum.percussion.com/showthread.php?t=323

I would be interested in seeing the official response to this. I believe the problem here is while the “eNewsLetterSnSidebar” is an allowable template for “rffNavTree” it is NOT for “rffNavon”. The navon is what the managed navigation is looking at in the subfolders (not root folder).

The following forum post I believe tells you the correct way on how to add a new slot to the navtree / what you need to do to get it to work.

http://forum.percussion.com/showthread.php?t=323

I believe that the template should be allowed on both Navon and NavTree. This was the “original intent”, although I’m not sure it’s still technically required in 6.5

I look at the code in http://forum.percussion.com/showthread.php?t=323. Do you know the binding setting for the template?

I tried the following but nothing was returned.

		#__slotsetup("Sidebar_slot" "")
		#set($navTreeItem = $sys.assemblyItem.clone())
		$navTreeItem.setNode($nav.root)
		#set($sys.currentslot.relresults  =  $rx.asmhelper.assemble($navTreeItem,$sys.currentslot.slot,"template='eNewsLetterSnBasic'"))
		#foreach( $relresult in $sys.currentslot.relresults )
			<p>$relresult.getProperty("displaytitle").String</p>
		#end

Try it without the quotes:

#set($sys.currentslot.relresults = $rx.asmhelper.assemble($navTreeItem,$sys.currentslot.slot,“template=eNewsLetterSnBasic”))

dbenua,

I still got nothing back with the change. Any other suggestion on this?

global template


#slot("rffNav" "" "" "" "" "template=eNewsletterSnSidebar") 

eNewsletterSnSidebar


<p><b>Debug trace: From eNewsletterSnSidebar</b></p>
#__slotsetup("Sidebar_slot" "")
#set($navTreeItem = $sys.assemblyItem.clone())
$navTreeItem.setNode($nav.root)
#set($sys.currentslot.relresults = $rx.asmhelper.assemble($navTreeItem,$sys.currentslot.slot,"template=eNewsletterSnSidebar"))
<ul>
#foreach( $relresult in $sys.currentslot.relresults )
<li>snippet: $relresult.getProperty("rx:displaytitle").String</li>
#end
</ul>

Preview navtree, which have one snippet item added under Sidebar_lot, as eNewsletterSnSidebar
Debug trace: From eNewsletterSnSidebar

If you look at the standard slot macros, you’ll see that there’s a step where it “combines” the parameters. You seem to be skipping that step. Is there some reason for this?

Are you talking about doing something like this #set($sys.currentslot.relresults = $rx.asmhelper.assemble($navTreeItem,$sys.currentslot.slot,“template=eNewsLetterSnBasic&template=eNewsletterSnSidebar”))? This did not work either.

I have 3 templates for this. Global template “eNewsletterGlobalTemplate”, type specific template “eNewsletterSnSidebar” for navtree and navon, and another type specific template “eNewsLetterSnBasic” for BasicSnippet.

My purpose is to add Snippets to Navtree, which will render as right sidebar using “eNewsLetterSnBasic” template, on every page under the site. Since it did not work I passed different template (eNewsLetterSnBasic and ENewsletterSnSidebar) as parameters in $rx.asmhelper.assemble method.

Did you see another place that I did wrong? Can we do a webex so you can take a look of it?

I use combine method instead of string and it’s working fine now. Thank you for the helps.