Hi community,
I have an issue about TVs were i am useing the @INHERIT binding. I use REVO 2.0.6 and i have setup two TVs with @INHERIT binding. Well, everythink is running fine so far and the @INHERIT functionality is runing satisfying.
As i see the binding is putting the parent(...parent(...parent)) value in the TVs content field (in "Manager" under "Resources" -> "Template-Variables").
Is there a possibility to set the binding in that way that it is putting "@INHERIT" to the content field instead the actual parent content? Coz, I am realize some negative handling when the content is included.
I wane use the @INHERIT binding as a news box. And the news should be different just on special resources. Well, when i am editing a "normal" resource or better when i am editing another TV except the news TV, then the news TV is beeing saved also and it is not inherited anymore. coz, it is saving the content of the parent. So I always have to set the news TV manually to @INHERIT again.
Also i noticed that, when i am typing @INHERIT to the content field of the TV. Later, it is not marked as inherited anymore. It seems that the marking just occurs when the TV is not set in the database table `modx_site_tmplvar_contentvalues`.
Maybe it should be possile to overload the TVs class in a SNIPPET? Or is there an easier way to solve my problem?
I would be happy about any clue.
Thanks and greetings from germany
you can try this:
lets say you have a default content in one resource (id=100)
but on some recources you want to show an extra-content
create a radio-tv ’whichcontent’ with inputoptionvalues:
and default-value: default
use it this way:
[[*whichcontent:is=`default`:then=`[[!getResourceField? &field=`content` &id=`100`]]`:else=`[[*content]]`]]
instaed of output-filter you can use also the If-snippet, which works somtimes robuster than conditional output-filters.
ich dachte es geht ums content - feld. Bei ner TV gehts doch einfach auch über den standard-wert, oder versteh ich immer noch nicht was Du genau vorhast.
I think we are in the common section of this board. So there we should write in english.
I have a news box (TV). And the box is markup text. so i use the rich text editor for it. I have a main resource at top level and all the other resources are underneace, which should inherit the text from the news box. Just some pages have different markup text in the news box TV.
I am using @INHERIT to achieve that. Everythink is working fine, as i want it. Just that @INHERIT is including the text from the parent resource in the rich text field, instead the string "@INHERIT". When I save the content of the Resource then the news are static from that moment. when i change the parent it is not changing the child resource anymore. coz it is not @INHERIT in its value, it is the old text.
To get the text inherited i need to write down @INHERIT in the rich text box everytime when i am change something in the resoure and thats quite annoying.
well, your workaround did it so far for this time (even when i dont need @INHERIT coz of it anymore). But still i think there should be a smarter solution.
thanks and good night