It turns that the problem was not #parse inside a section on view component. Last line of the included file's (_bytask.vm) was a comment, and I dont know why, parse command ignores all the file. I simply add a blank line after comment.
_bytask.vm (original) This is the content ##content<end of file> _bytask.vm (modified) This is the content ##content <end of file> Thanks anyway! On Mar 11, 10:20 pm, hammett <[email protected]> wrote: > What's the problem? Exception? > > On Wed, Mar 11, 2009 at 9:55 AM, Jorge Barnaby <[email protected]> > wrote: > > > Hi, > > I have a View Component that I used this way: > > > #blockcomponent (Page with "pagetitle=Title") > > #pagecontent > > content > > #parse ("checklist/ChecklistDashboard/_bytask.vm") > > #end > > #end > > > And this is how it works: > > > public class PageComponent : ViewComponentEx > > { > > (...) > > public override void Render() > > { > > Context.ContextVars["pagetitle"] = pagetitle; > > > StringWriter sw = new StringWriter(); > > string section = "pagecontent"; > > if (HasSection(section)) > > { > > RenderSection(section, sw); > > Context.ContextVars[section] = sw.ToString(); > > } > > (...) > > > base.Render(); > > } > > } > > > I have no problems with the ViewComponent except when I use a #parse > > instruction inside #pagecontent. How can I force RenderSection to > > render view from the #parse? > > > Thanks! > > Regards, > > yorch. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
