Nested Conditional Keywords


(Nick Papadatos) #1

Matrix Version: 5.3
Hi Squiz folk, asking the question around nested conditional keywords in my Paint Layout. I have 7 conditions but the last nested condition “Sport” doesn’t show but if I leave it out it works. Is it that the last condition isn’t needed? i.e Should work if tagged with the sport metadata tag?

all conditions are Keyword Regexp Conditions see attached:

coded conditions:

  %begin_Youtube%
	 xx
    %else_Youtube%
       %begin_Announcement%
	   xx
	   %else_Announcement%
		   %begin_Highlights%
				 xx    
			%else_Highlights% 
			    %begin_Policy%
				 xx  
			   %else_policy%
			      %begin_Podcast%
				      xx
			     %else_podcast%        
			       %begin_Twitter%
				    xx
			     %else_Twitter%
			     %begin_Sport%
				     xx                      
                 %end_Sport%            
              %end_Twitter%
           %end_Podcast%
         %end_policy%
       %end_Highlights%
      %end_Announcement%
    %end_Youtube%

(David Schoen) #2

When you say it works when you leave out the last condition, what’s actually happening?

You could confirm that it’s not just evaluating your condition weirdly by shifting the contents in the begin_Sport conditional to a else_Sport condition.


(Nick Papadatos) #3

Ahhh just realised my bad. In the image attached above it should be %asset_metadata_post_format% not sport

Cheers
N