While working on various Helix project implementations, I heard different opinions on how to deal with different page types in a Feature. I have these two examples:
- Let's say that we have the
Metadata
feature which displays themeta title
for all pages. What would be the approach if for example the meta title needs to be dynamically changed for theNews items
in the News feature project (these don't have a meta tile field and needs to be calculated)? - If in the
News feature
project there is a need to read only some fields from the ancestors (which will be used in the html), those Templates/Field being part of a different Feature, for exampleThemes
.
What is the recommended practice in these situations? Are there any cases where a method would be duplicated in two features (like in the 2nd example) or should this always be moved to the Foundation layer?
Thanks for the help and sorry if the question is opinion based only.