Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kevin Coster 83 posts 120 karma points
    Feb 17, 2016 @ 12:11
    Kevin Coster
    0

    Active Directory Phone Book

    Hello All

    I'm currently developing a Company Intranet and want to use our Active Directory as the point of contact to make Corporate Phone/Contact Book.

    The easy bit was getting the data out of AD and have that in a database columns of Name, Number, Email, Extension, Job Title, Mob etc but im now trying to think of ways to display the data in a quick easy method.

    For the record I'm an IT Manager not a Developer

    My first thought was to point Umbraco directly at the database but after much reading found this wasnt something I could do just through Umbraco... or from what I have read so far...

    So after that I thought about what if I used the CMSimport package to pull the data in and use that then render it via Macro that lists the content of the users... I got so far with that as I can get the macro to list the Page Title (Firstname Surname) but none of the contents of the doctype showing the details (Numbers, Email, Job Title).

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @{
         var selection = Umbraco.Content(1834).Children("InternalContact").OrderBy("Name");
    }
    <ul>
         @foreach(var item in selection){
              <table>
                  <tr>
                  <th width="60%"><a href="@item.Url">@item.Name</a></th>
                  <th width="40%">@Umbraco.Field("jobTitle", recursive: false)</th>
                  <th width="20%">@Umbraco.Field("extensionNumber", recursive: false)</th>      
            </tr>
        </table>
    
    }
    

    Im now out of ideas i think if i had a preference the SQL into Umbraco would be my preferred option bypassing an import process as its just another step however if it becomes easier doing an export to import it again then so be it!

    Any advice help pointers that i could look into that i might have missed!

Please Sign in or register to post replies

Write your reply to:

Draft