This project is read-only.

Add-on Catalog

Dec 1, 2008 at 4:02 PM

How can I extend the Add-on catalog, so that the information tabs handles differents version of downloads.
Some kind of child of versions on same product.

Dec 1, 2008 at 5:31 PM
The wiki does something similar. The wiki article references a history.aspx template which pulls the item versions in the database.
Dec 1, 2008 at 9:50 PM
Thanks for your answer libardo. I have looked at the source, but I can figure it out

I'm trying to modify the add-on, but I cant get it to work. What I want is, when right click on the "add-on", a new type called "New version"
How can I extend this feature into add-on.
Also next to (download Homepage Source Code Edit Addon) I would have a tab called "Versions"

Hope that you can point me in the right direction. Help
Dec 1, 2008 at 11:16 PM
Sounds like you would want to modify the model somwhat:

Now it's like this:
  • AddonCatalog
    • Addon
I'm assuming you want this
  • AddonCatalog
    • Addon
      • AddonVersion
To do this you would probably create an item class:

    [Definition("Add-on version")]
    public class AddonVersion : AbstractContentPage   ....

And then you would move the properties you expect to change between versions from the addon class to this class.

In the aspx of the version you could create a property to the addon of the version:

 public partial class AddonPage : TemplatePage<Items.AddonVersion>
        protected Addon CurrentAddon
            get { return (Items.Addon)CurrentPage.Parent; }

And display information:
    <p><label>Downloads (of this version)</label> <%= CurrentPage.Downloads %></p>
    <p><label>Downloads (total)</label> <%= CurrentAddon.Downloads %></p>

By now you should be able to create addons and versions thereof from the editing interface. To allow external users to create stuff there is more work to do but I hope it's enough to get started.
Dec 2, 2008 at 2:59 PM

Hi libardo

Thanks that help a lot. I now got it to work.
Just one question.

  • AddonCatalog
    • Addon (name)
      • AddonVersion
    How can get some info from Addon and use them in AddonVersion ? (name)
  • Dec 2, 2008 at 5:05 PM
    I'm not exactly sure what you mean. Wouldn't the "CurrentAddon" technique work? You have the option of overriding properties and having them return Parent.Name
    Dec 3, 2008 at 10:25 AM

    You a right on the parrent part. That what I want.
    Could you show how this is done?