Sections are what the component gets from the page. What you seem to want is selecting which view to render, which is something else entirely. Create two views in Views/components/LoginComponent/ and call Context.RenderView()
On Thu, Sep 25, 2008 at 12:52 PM, bdaniel7 <[EMAIL PROTECTED]> wrote: > > Hi, > > I made a viewComponent, that would render some info if a condition is > true and other info otherwise, inspired from WineCellar. > > I made the Views/components/LoginComponent/default.vm and defined 2 > sections, "anonymous" and "loggedIn". > > in LoginComponent.cs i added in render: > > if (notLoggedIn) > Context.RenderSection( "anonymous" ); > else > Context.RenderSection( "loggedIn" ); > > i know that the original code defines the sections inthe page where > are used, however i want to just use #component(LoginComponent) and > have the code rendered. > > the problem is that nothing is rendered. > > What am i doing wrong? > > Dan > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
