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

Forums / Bugs & Issues / Unique Library Categories and Programmatic Access via Pluggable Module

Unique Library Categories and Programmatic Access via Pluggable Module

2 posts, 0 answered
  1. Marcus Collier
    Marcus Collier avatar
    3 posts
    Registered:
    18 May 2010
    09 Jun 2010
    Link to this post
    Hello,

    At the moment we are trying to integrate our custom pluggable module with an Images and Documents Library which we will create and manage at runtime. As the Images and documents will relate to data managed by our custom module, we are creating a library category structure that will allow users to easily manage the files...

    We were planning a top level category for each unique record in our data and then for each top level category we want to nest a series of sub categories... The problem is when we create our sub categories we get "Category with the same name already exists!"

    For example we would like something similar to the following:
    Asherville
    -Brochures
    -Plans
    -Images
    Astor
    -Brochures
    -Plans
    -Images

    Sounds rather limiting... How can we get around this?

    Also from within our custom module we would like to also allow our users to directly upload Assets to these categories without the need for navigating to the Images and Documents Module... I've been looking into the Telerik.Libraries.WebControls.ButtonSelector however this is a ReadOnly interface... Is there any existing Dialog that we can summon from a Custom Module to allow our users to Upload Assets to targeted categories in a Library?

    My apologies for my mass of questions but I have one more thing... Say a user is in the Images & Documents Module and has selected a Category... The user can then click the upload button to upload file assets... The problem here is that once the file is uploaded it is not bound to the originally selected category; the user instead must select the category from a combo box which in time using the method above will get rather lengthy making this cumbersome... Is there a way we can have File Assets upload to the selected category from the Categories Control Panel?

    We are trying to leverage as much of Sitefinities built in functionality as possible...

    Thank you

    Regards

    Aaron
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Jun 2010
    Link to this post
    Hi Aaron Collyer,

    The unique identifier for the categories is the Category Name. It is not possible to use another identifier and change the logic, because this will cause troubles with the public controls which uses the categories.

    You can declare the ButtonSelector in the template of your custom view and upload to the Images and Documents module. The category is related to the IContent object, not to the library and categories are specific to a provider.

    <asp:TextBox ID="Image" Text="" runat="server" MaxLength="250"></asp:TextBox>
    sfLib:ButtonSelector ID="ButtonSelector1" WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx" AssociatedControls="Image" runat="server" cssclass="pickerWrapper" ButtonText="Image" />

    You could create a custom uploaded control which allows to set the category of the uploaded items. You might find this post useful -Set Category after uploading documents via zip

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered