Copied to clipboard

Flag this post as spam?

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


  • Klaus Hebsgaard 10 posts 40 karma points
    Mar 06, 2014 @ 10:02
    Klaus Hebsgaard
    0

    Field with multiple values and headings

    I have made my own address field in contour.
    This field has street, streetnumber, town etc.
    These fields are posted to the server sepereately since they are seperate html form fields.
    And in the ProcessValue method on the field, I can return each value in the List

  • Comment author was deleted

    Mar 06, 2014 @ 10:06

    Hey Klaus,

    You can't change this, since if it's a single field you'll also have a single column in the entries viewer

    What you could do it have a custom export option, since the export is basicly an xslt performed on the records so you could control that one

    You can find the default ones in the dir Umbraco\plugins\umbracoContour\xslt

    So would suggest to take excel.xslt as a starting point

  • Klaus Hebsgaard 10 posts 40 karma points
    Mar 06, 2014 @ 11:16
    Klaus Hebsgaard
    0

    Thanks Will try that. Can I somehow add a button to the contour backend to export my own xslt?

  • Comment author was deleted

    Mar 06, 2014 @ 12:43

    Ah you can use the provider model :) and create a custom fieldexporttype check shared sourcecode for examples, pretty simple, xslt is the hard part

  • Comment author was deleted

    Mar 06, 2014 @ 12:44
  • Klaus Hebsgaard 10 posts 40 karma points
    Mar 06, 2014 @ 14:38
    Klaus Hebsgaard
    0

    Yes I see that, as you say, it is very easy to create an export type. How do I make it appear in the backend so I can export using this new type?

  • Klaus Hebsgaard 10 posts 40 karma points
    Mar 06, 2014 @ 15:27
    Klaus Hebsgaard
    0

    Here is the code

    public class ExportAeForm : ExportType
        {
            public ExportAeForm()
            {
                Description = "Exports all data to a csv file with addressfields expanded";
                Name = "special CSV File export";
                Id = new Guid("024a6095-75ba-4d5b-a894-de95da601a47");
                FileExtension = "csv";
            }
    
            public override string ExportForm(Form form)
            {
                string content = @"";
                return content;
            }
        }
    
  • Klaus Hebsgaard 10 posts 40 karma points
    Mar 07, 2014 @ 09:39
    Klaus Hebsgaard
    0

    Wow I just discovered how this works it did not see the tiny arrow in the left corner of the screen. The thing is working - it was just hidden up there...

Please Sign in or register to post replies

Write your reply to:

Draft