Dave Burke : Freelance .NET Web Developer specializing in Online Communities

Using the Community Server Gallery Photo Order Service

The Photo Ordering service has been around in Community Server forever.  I didn't know it was still available, but a client asked for it recently so I went searching for legacy bits in the SDK to bring it out of retirement.  For how long it will be functional with the impending release of CS2008 and the merging of the File and Photo galleries into a single Media Gallery is not known, but confidence is not high.  And since there are probably only 2 Community Server sites in the world using this feature, I'll make this post short.

A quick SiteUrls.config review finds a gallery_ViewOrderPrints url available, but as an orphaned url, it simply doesn't work anymore.  The resulting url is http://mycoolcssite.com/photos///order.aspx.  Fortunately we can fill in the blanks by rolling our own path to order.aspx, which is the trick.

 

<script language="C#" runat="server">

    private string orderUrl;

    public string OrderUrl
    {
        get { return orderUrl; }
        set { orderUrl = value; }
    }
    void Page_Load()
    {
        if (CurrentGallery != null)
            SetTitle(CurrentGallery.Name, true);

        OrderUrl = http://mycoolcssite.com/photos/ + CurrentCSContext.ApplicationKey + "/" + CurrentGalleryPost.PostID + "/order.aspx";

    }

</script>

   <div style="margin-top: 20px;">
                <a href='<%= OrderUrl %>'>Order this photo!</a>
            </div>       
                <div style="margin-top: 20px;">
                 <!-- The following would appear to be correct, but doesn't do it for us -->
                <CSControl:SiteUrl UrlName="gallery_ViewOrderPrints" runat="Server"
                       Parameter1='<%= CurrentCSContext.ApplicationKey %>'
                       Parameter2='<%=  CurrentGalleryPost.PostID %>' Text="Order it again!" />
    </div> 

Comments (0) | Post RSS RSS comment feed

Posted on 2/18/2008 8:09:37 PM by Dave Burke
Categories: Community Server
Tags: no tags for this post

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke