1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Does anyone have a module to list products/employees/etc with thumbnails?

Does anyone have a module to list products/employees/etc with thumbnails?

4 posts, 0 answered
  1. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    12 Jun 2009
    Link to this post
    Hi

    I need to create a page that lists employees (consisting of a thumbnail with their name and brief description alongside it). Does anyone have a module that would do something like this? It sounds like quite a generic module that would be suited to all kinds of list such as products, so I'm sure someone must have done something like this!

    I have been looking at your sample "products" module, and I'm sure I could modify it to include an image URL for each item (given the time of course!). Is this achievable? And how could I have the "public" control only list content in a certain category? (It seems to list all generic content currently).

    This might be better in the "suggestions" forum, but I'm a bit put off using the generic content module because the admin page isn't very user friendly. It would be nice if you could easily filter by category, so if I'm using generic content for a number of different purposes the admin list would soon get very long. I realise there is a "Search items by" option, but it's a pity that this is a textbox rather than a dropdown of categories (which would be more user-friendly to admin users - something important to my clients!).

    Thanks again for all your help so far on the forums.

    Andy
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    12 Jun 2009
    Link to this post
    Though I haven't done what you're attempting myself, it shouldn't be too difficult to add a new generic_content provider.  remember you can have a different provider for each type of content, like "Employees" and  "Products" etc, with each having its own section that you can admin separately underneath the generic content module.

    You can set separate meta fields for your "Employees" provider to just collect the data you need, including a thumbnail url. on the front end, when you drop a contentview on the page, you can select the "Employees" provider (instead of the default one) and futher filter by category, tag, or anything else you need from the advanced tab of the properties for the control...

    However, I needed a similar list, just employees, phone numbers, no picture. I ended up just making an intrasite module, linked to my sql table using a dataadapter and dataset.

    Sitefinity is flexible to allow you to do either approach, whichever you feel more comfortable with. The generic_content route is simpler, but the custom intrasite module is eertainly more flexible (but takes longer).

    hope this was helpful let me know which approach you think would work best for you and I'll do my best to help you on your way!
  3. Andrew
    Andrew avatar
    47 posts
    Registered:
    22 May 2009
    16 Jun 2009
    Link to this post
    Thanks for the reply. I've started looking at doing this with an intra-site module. Looking at the pluggable module samples in the help documentation scared the life out of me! I started trying to modify the generic content products module sample, but there's far too much in there.
    No offence to Telerik - there's a lot of detail in the help and samples, but there's no substitute for a decent book on the subject (has anyone written a "Sitefinity dDevelopers guide"?!) that takes you through doing something like this step by step.

    I've got most of it working in an intra-site module, but a couple of questions:-

    1) I've used the "contacts" intra-site module as a starting point. In the ContactEditor.ascx there is a "photo picker" but it lets the user browse the physical file system. How can I implement a dialog like the thumbnail picker in the News module instead, that lets the user browse image libraries?

    2) In the "contacts" sample it was only necessary to add toolbox control entries to web.config. I'm just curious how the new module gets discovered? Is it Reflection?

    3) The sample uses SqlDataSource controls to bind the UI to the data. How could this be done in a generic way, to use whatever database Sitefinity uses (MySql, SQL2005, etc.)?

    Thanks again
    Andrew
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Jun 2009
    Link to this post
    Hello Andrew,


    1) I've used the "contacts" intra-site module as a starting point. In the ContactEditor.ascx there is a "photo picker" but it lets the user browse the physical file system. How can I implement a dialog like the thumbnail picker in the News module instead, that lets the user browse image libraries?

    You can use ImageSelector [WebEditor("Telerik.Libraries.WebControls.ImageSelector, Telerik.Libraries")]
    Another option is using the exact ButttonSelector as we have it for News module.

    <asp:Label ID="Label9" AssociatedControlID="Image" runat="server"><asp:Literal ID="Literal19" runat="server" Text="SelectImage"></asp:Literal></asp:Label> 
    <asp:TextBox ID="TextBox1" Text="" runat="server" MaxLength="250"></asp:TextBox> 
    <sfLib:ButtonSelector WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx" AssociatedControls="Image" runat="server" cssclass="pickerWrapper" ButtonText="Select" /> 
    <class="example"
      <asp:Literal ID="Literal21" runat="server" Text="Note"></asp:Literal> 
    </p> 

    You can get the templates from the external one archive.

    2) In the "contacts" sample it was only necessary to add toolbox control entries to web.config. I'm just curious how the new module gets discovered? Is it Reflection?

    2. You should register the module in your web.config

    <modules> 
    <add type="Sample.Contacts.ContactsModule, Sample.Contacts" /> 

    You should also add module provider and handler.

    3. The sample uses SqlDataSource controls to bind the UI to the data. How could this be done in a generic way, to use whatever database Sitefinity uses (MySql, SQL2005, etc.)?

    The module uses ObjectDataSource and services - ContactsServices. You can use the same way together with nolics as well.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered