In my site I want subviews/view components to be able to append their
custom javascript blocks to HTML head. I basically use
CaptureFor(@id:javascript, @append:"after") in the subviews for that.
However, the @append parameter is being ignored in such case.
In other words, given a SubViewWithCaptureFor.brail:
<?brail component CaptureFor, {...@id: "title", @append: "after"}:
?>${value}<?brail end ?>
and a view:
<?brail OutputSubView("SubViewWithCaptureFor", {...@value: "one"})
OutputSubView("SubViewWithCaptureFor", {...@value: "two"}) ?>
<div>${?title}</div>
I get back the html: <div>two</div> instead of expected <div>onetwo</div>
The real problem is that I'm not sure what is the proper way of fixing
this. It seems that the correct way would be to somehow pass the title
variable to (at least second) subview, and changing the second subview
call to the following works:
OutputSubView("SubViewWithCaptureFor", {...@value: "two", @title:title}) ?>
But currently subviews do not inherit parent variables by default, and
I'm not sure that such a change is justified.
Any suggestions?
Regards,
Vladimir Okhotnikov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---