Add Static Page to "Page List" Widget

Topics: ASP.NET 2.0, Controls
Oct 2, 2008 at 3:42 AM
I am trying to add a page (which I created outside of the to my blogs "Pages" widget.  I can test that the page is working great by typing in the direct URL.  However, this is not convenient at all, since my users will have no idea that it exists.  When you create pages in the BlogEngine, I know that they show up in the Pages widget (usually in the sidebar).  The page I am adding is a standard .aspx page with a .aspx.cs code file.  Any Ideas?

Thanks -sliPrix
Oct 2, 2008 at 6:21 AM
I would encourage you to use the pages functionality instead of creating a separate page.  You can usually achieve anything you need using a UserControl and imbedding that UserControl within a Page.  The main reason for my recommendation is because you will end up doing a lot of manually duplication of configuration, styling, and what-not.  Keep in mind that separate pages won't execute any of the extensions and handlers that are included in the BlogEngine Page class.  I initially started down the same path you are headed and decided it wasn't worth the added effort to maintain everything...

Wrapping your needs in a nice UserControl is a great way to use BlogEngine in the manner you are looking to accomplish!

Now, if you must add separate pages you will need to manually add the links to your menu...  I don't believe there is a way to inject the external (to BlogEngine.NET but on your webserver) pages into the BlogEngine Pages section.  Even I think that last sentence is confusing so if you need more help please post additional questions.
Oct 2, 2008 at 10:09 PM
Hey, dsuoduc!  Thanks for the reply, I didn't even think about making it into a control.  Assuming I have the control made, how would I import it to the page which I will be creating using the BlogEngine.NET admin interface? The only files that I can find which reference these pages are the xml files with general info such as page title and whatnot.  Thanks for the help.
Oct 4, 2008 at 7:51 PM
I have the control added to a page, and I'm hung on one little snag.  I cannot change the visibility of an <asp:Panel> tag.  This panel is being controlled in the code-behind of the control.  When it was a standalone .aspx page, the code worked flawlessly.  Any ideas on why I would not be able to make a panel visible?

Thanks - sliPrix
Oct 4, 2008 at 7:57 PM
Sorry, forgot you cannot hide table rows with a panel.....