Small section in the Sidebar

Topics: ASP.NET 2.0, Controls, Themes
Oct 11, 2012 at 2:52 PM

Hi

i like the smal section in the sidebar of the url http://www.dotnetblogengine.net/, how is the code for to create some ssmall ection in the sidebar ...????

for example in url http://www.dotnetblogengine.net/ .. see the section categories and archivies,

what is the code???

Can you help me?

thanks

Fabry

Coordinator
Oct 11, 2012 at 3:17 PM

You can add multiple widget zones to your theme anywhere you like and then style it to look the way you want. No need to code. Or use individual controls if you don't want a zone, like categories control - you can add it directly to the theme's site.master page like any normal asp.net control.

Oct 11, 2012 at 3:49 PM

Thanks, but do you have an example??

Oct 11, 2012 at 4:31 PM

for example i want to reduce dimension of Categories and List Month where i must to do? what component i must to modify?

i musto to add multiple widget zone in file CSS of my themes? but then how can to connect this at Categories of another widget???

Fabry

Coordinator
Oct 11, 2012 at 7:44 PM

Read this on how to use multiple zones. To add any control from app_code/controls directly to the page, use something like this. Not sure I understood about CSS and connections. In any case, app_code/controls contains most of the widget code. Widget itself basically a wrapper around control to provide container and editing functionality.




Oct 12, 2012 at 8:11 AM

Ok thank you very much rtur

Fabry

Oct 20, 2012 at 6:00 PM

I have very difficut to add a new widget zone with site.cshtml.. i have this situation

1) site.chtml with this command : @Html.Raw(Html.RenderWidgetZone("be_WIDGET_ZONE"))</p>

2)widget container. cshtml

3)control widget zone..

i have create another widget zone control for example widgetzoneLeft and in widget container.cshtml i made this

if (Model.Widget.Zone.ToLowerInvariant() == "be_WIDGET_ZONE_LEFT")

 string rightboxMidDivStart = "<div class=\"rightBoxLeft\"><div class=\"rightBoxTopLeft\"></div><div class=\"rightBoxMidLeft" + searchCss + "\" " + inlineStyle + ">";
  string rightboxMidDivEnd = "</div><div class=\"rightBoxBottomLeft\"></div></div>";

but don't work...

someone had made a widget zone with themes without site.master???? but with site.cshtml and widgetcontainer.cshtml??

HELPPPP

Fabry

Coordinator
Oct 20, 2012 at 6:59 PM

This works for two zones with theme I just tried, (unless you trying to do something else):

<div>
	@Html.Raw(Html.RenderWidgetZone("be_WIDGET_ZONE"))
</div>
<div>
	@Html.Raw(Html.RenderWidgetZone("be_WIDGET_ZONE_2"))
</div>

Oct 23, 2012 at 5:43 PM

yes i know this but i must to create 1 render fòr float left widget and 1 for float right widget. it's not very clean :

Coordinator
Oct 23, 2012 at 6:35 PM

I'm lost.

Oct 23, 2012 at 10:58 PM

Ok rtur
but for redirect permanently 301 of this discussion http://blogengine.codeplex.com/discussions/397380

by subdirectory to root you think that isn't possible to make it?

i have made this code in global.asax but don't work i don't know why... what do you think???

    void Application_BeginRequest(object source, EventArgs e)
    {
        HttpApplication app = (HttpApplication)source;
       
        string thisUrl = app.Request.Url.ToString().ToLower();

        if (thisUrl.Contains("http://localhost/blogenginese"))
        {
        HttpContext.Current.Response.Status = "301 Moved Permanently";
        HttpContext.Current.Response.AddHeader("Location",thisUrl.Replace("http://localhost/blogenginese","http://localhost/blogengine"));
        }
        CompleteRequest();
        HttpContext context = app.Context;
       
        // Attempt to perform first request initialization
        FirstRequestInitialization.Initialize(context);
       
    }


the error is

Errore HTTP 404.0 - Not Found