This project is read-only.

Table-less sidebar

Topics: Developer Forum
Feb 22, 2007 at 8:40 PM
hi folks,
thanks for MWPSK, Agile and perfect .
i've noticed that the left sidebar is a table, how could i switch to table-less sidebar ?

Feb 26, 2007 at 9:39 AM
Hi que0x

The HTML for the sidebar is created by an xsl transformation. The corresponding xsl file can be found in the folder of your current theme (for example /App_Themes/BeachBlue/sidebar.xsl). There you can change everything according to your needs. Note that every theme has its own sidebar.xsl.

Feb 26, 2007 at 2:01 PM
thanks Mattias,i'd rather modify the code itself to genarate table-less sidebar,i think this xsl transformation is for designing, please correct me if i got it wrong .

Feb 26, 2007 at 2:30 PM
The xsl itself only transforms the xml of the sidebar's content to html. So this is exactly, where you should make your changes to produce a different output.
Feb 26, 2007 at 3:50 PM
so i can modify it to product table-less sidebar (has no <table>,<tr>,<td> tags) ?
Apr 4, 2007 at 10:34 AM
This discussion has solved my main problem with the sidebar, I now have full control over the HTML - thanks. The starter kit does seem to be very nicely skinable.

One question though; where can I see the XML for the sidebar (or it's schema/documentation) that the XSL is transforming. I'm a web-designer so would rather avoid working through any server code if I can.

Many thanks,

Apr 4, 2007 at 11:56 AM
Hi Ed,
in the App_Data you can find the Sidebar.config file, which is listening the section ids, which are shown in the sidebar. The XML, that is used for the XSL transformer is generated dynamically in the sidebar class in the method GetRSSFeed.
At last the SidebarControl class is loading the sidebar object and rendering the html to the page. Therefore it uses the xml generated by the sidebar class and the sidebar.xsl transformer (see method: CreateChildControls)

when you have further questions, please let me know !

Best regards,
Feb 28, 2008 at 6:54 PM
Hi webeasy,

I have implemented the sidebar html extension (with roles, etc.) and it works well. However, I am having difficulty changing the layout. Currently, whatever HTML that is created for a specific page is inserted at the bottom of the right sidebar content. I looked over the sidebar.xsl file and I don't see a reference to the custom html section. I want to find out how to find the parameters to add that customization to the .xsl file so that I can move that content to the top of the sidebar.

Thank you,