Reading field your landing page

That is, Reading field “from” your landing page…

I’m using a prop_slot in order to set a slot’s contents once on a landing page, and render those slots on all the items in that folder (so that the section listing nav stays constant as you navigate around the section).

However, I also want to specify a couple fields on the folder’s landing page, and have the items in that folder use that field rather than having to set it on all the individual items and keep them in sync.

Is there something similar to prop_slot for fields? Is there a pso JEXL function for getLandingPageField( ) or something similar, so that I can create a binding in my template to pull the appropriate field from the folder’s landing page? Any other way to accomplish what I need?

Thanks in advance.
Dan

Hi Daniel

I’ve done something similar which uses a navigation template which recurses up the tree until it finds the values. If it reaches the root then it can also display some default values.

#macro(default_number)
	##code when found the top level item, root


#end

#macro(find_section_home $node)
	#if ($node.getProperty("rx:sys_contentid").String == $nav.root.getProperty("rx:sys_contentid").String)
		#default_number()
	#else
		#set($ctype = $node.getProperty("nav:landingPage").node.getProperty("rx:sys_contenttypeid").String)

		#if($ctype == "9999") #your contenttypeid
    			#set($field = $node.getProperty("nav:landingPage").Node.getProperty("rx:yourfieldname").String)
    		
    			#if($field != "")
    				$field
    			#else
				#default_number()
			#end
		#else
			#find_section_home($node.parent)
    		#end
    		
	#end
#end

#find_section_home($nav.self)

Hope this helps.

Cheers
James