<< Previous Post
Next Post >>



Posted by admin under General  sBlog.Net  on Feb 24 2013

This post discusses a much more elaborate way by which you can create a custom designed theme, instead of using the themes provided by deault. This method will work either when using Visual Studio or IIS. The following are the steps to accomplish this:

  • Select the Themes folder
  • Right click on the Themes folder, select New Folder, enter a name for your theme
  • In this method, you have to create the layouts of your post, page and also the css
  • Now create 2 files: _Layout.cshtml and _LayoutPage.cshtml
  • Create a folder called css, add a file called style.css and add the styles you like
  • Refer to any of the default that has these 2 files, add the html to your new files similar to the ones present in the default themes
  • You can also copy/paste existing layout and modify them as per your needs
  • Just make sure you have all the sections, like the categories section, recent posts section etc!
  • Now, save the changes, build / publish your project and launch it
  • Login to the administration section as the administrator and go to the Settings section
  • Now, if you select the blog theme drop-down you will notice your new theme
  • Select your new theme and save the changes
  • You should now be able to see your theme being applied!

Congrats on creating your first theme using layout files!

Tagged sblog.net 
share the love!



comments

there are no comments for this post. be the first to post one!


post your comment

name (*) - required
email address (*) - required
site address
your comment (*) - required

(*) - required


<< Previous Post
Next Post >>