 				
 				recalculateCandidate = ->
 				
+					# Get the skin assets.
+					skinAssets = config.get(
+						"packageConfig:shrub-skin:assets:#{currentSkinKey}"
+					)
+					
 					# Track changes to the current template candidate.
 					oldCandidate = candidate
 					

			# compilation step.
			link = directive.link
			directive.link = (scope, element, attrs, controller) ->
			
				# Save top-level arguments for later calls to link functions.
				topLevelArgs = arguments
				

						"#{path}--#{candidate_}.html"
					candidateTemplates.push "#{path}.html"
					
					# Return the first existing template. The asset
					# templates are already sorted by descending
					# specificity.
					candidate = do ->
						for uri in candidateTemplates
							return uri if skinAssets?.templates?[uri]
						
						return
						
