-
- 135 Posts
Hi Guys, thank goodness for @INHERIT, it’s made life a crap load easier but was wondering if it’s possible for a subpage to inherit it’s parent TV value and then append extra data defined afterwards i.e.
TV named contentFooter contains @INHERIT plus <div>extra string etc</div>
The reason for this is that I’d like to setup a standard content footer with the page-trail, related links etc as well as some page specific content that the parent doesn’t contain.
I could add an extra tv called customContentFooter or something but using a single TV for this would earn a Gold Star, any ideas anyone?
But then it would no longer be a pure "inherit" feature. I can see where it might be nice, but I think "inherit" should mean just that, and if you want more, as you mentioned, add another TV for the extra content on a per-page basis. I am a firm believer in the KISS principle.
-
- 135 Posts
Me too - but disagree to a point - @INHERIT with additional tags would still retain the principal of inheritance, using a real world metaphor - if my children inherited my blue eyes, it doesn’t mean they have to inherit my eye lashes.
I tend to wrap most of my output in div’s and would either have to write a snippet to not output the wrapping element if the tv is empty or include the wrapping divs when entering values into the TV field. Either way is not an elegant approach or keeping with KISS.
I’ll have to try a few options out over the weekend.
-
- 135 Posts
Smart thinking!!! This might be the solution after all, aaaaah boy, inherit inherit inherit, the options are endless!
I would prefer that @INHERIT works whether the parent is published or not.