Sunday, December 9, 2007

Umbraco + Member Controls + Image Verification

Adding image verification to the already supplied Umbraco Member Controls is pretty straight forward. Feel free to download the source files here or the complied files here.

Example of outcome



Please remember that the members controls are part of the Umrabco repository so any upgrades could results in the following information being overwritten.


1. Copy the membercontrols.dll into the bin directory of your website.
2. Upload umbRegister.ascx and image.ascx to the usercontrols/umbracoMemberControls/ directory.
3. Create a new macro and assign image.asxc to the .net dropdown
4. Tick use in editor



4. Create a new page called Image-Verification /image-verification.aspx and then add your macro to the page.

5. Cross your fingers and hope for the best :)

Skiltz!

Thursday, December 6, 2007

Umbraco + Display Latest Page Updates

Here is a little code snippet showing how to displayed the latest n updated pages on your Umbraco site. It shows all updated pages in the same tree structure.

First of all create a new XSLT file and create a matching macro. Copy the following code into the XSLT file and save.

Okay i just spent the last 10 minutes trying to figure out how to add an XSLT to Blogger and failed miserably so just get the code here


Go to the Macro you created and create two new parameters called updateCount (number) and showDate(bool). Also in Macro properties click "use in editor" so then you can use the macro in the editor. You should be done, go to the editor and add the macro to any pages you wish.




Umbraco + Bulk Adding New Pages

Recently I have been working on a new website for a Kennel Club organisation.

Our choice of CMS was Umbraco, i had personally never used Umbraco, but a few hours into the install and everything was going pretty well.

After doing some searches on the Umbraco forums and Google i didn't seem to find any facility to bulk load pages. Its quite possible one already exists and I just haven't found it. Anyway I thought this might be a good idea so I could gain a better understanding of how the Umbraco structure works. By trade I am very junior asp.net(vb.net) programmer, have little knowledge of XML and no previous experience with C#. So there's the disclaimer continue on at your own risk.

Click here to download the files you are going to need.
  • Bukimport.aspx needs to be saved into your umbraco directory (the same one that has create.aspx in it)
  • Bulkimport.dll needs to be saved to the BIN folder.
  • Book1.xls is a example of excel file of your new pages

What the Bulk Import will do:

  • It will create new nodes for the pages you specify
  • It can publish your new documents (can be turned off)
  • You can choose which node the pages will be created into
  • You can choose the document type

What the Bulk Import won't do (yet)

  • It will not assign any macro properties to the new document (eg Hide from nav)
  • It will not add any content to the new document (its all about creating structure at the moment)
  • It will not restrict your document types (eg if you have a master document type which doesn't allow children nodes then you will still be able to add child pages)

Right given that some interest is shown then if you want these above options implemented please let me know. The content for my Dog Breed pages have not yet been constructed so I have no need to bulk import content.

The screens are very ugly and confusing at the moment but that's not that point at the moment i just need some people to test this!

Obviously at the top of the page is import which you can import a new excel file its put into the same directory as bulkImport.xls hopefully you have rights I probably should change this to usercontrols or something anyhow that's where it is for now.

Controls on the page

Parent node is obviously the parent node of the new page you are going to create, you can also select any node which is higher on the grid (because it will be inserted first and we will therefore then know the Node ID)

The dropdownlist below the Grid allows you to change the parent Nodes for all pages in the grid.

Import obviously imports the new pages. May take some time depending on how many nodes you create. I imported 200 took about 30second from memory. You will be able to tell its done when the new nodes ID's are shown

Good luck and feedback would be good.

Skiltz