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

Forums / General Discussions / How to Save Custom Fields

How to Save Custom Fields

11 posts, 0 answered
  1. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    09 Jan 2014
    Link to this post
    Hi, I'm attempting to add custom fields to the settings of an inbound pipe.  I know this is amateur but even though I can get the fields to display I cannot get them to save and I have been unable to find any documentation on this.  If there is any documentation on how to do so or an example I could be pointed to that would be very helpful.

    Screenshot here, public private and feed number are the fields I added.
    http://imgur.com/HKMN9IG
  2. David C
    David C avatar
    33 posts
    Registered:
    02 Dec 2015
    10 Jan 2014
    Link to this post
    Hello Ben,

    Thanks for contacting us. I think what you need to do is call IInboundPipe's PushData method.

    Here are some other resources for you to take a look at that should prove helpful:


    Cheers,

    Regards,
    David C
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    13 Jan 2014 in reply to David C
    Link to this post
    Hi David,

    I don't think I communicated the question properly.  I think you gave me something for adding fields to every article imported by the feed.  I guess it boils down to me trying to add variables to this class:  

    http://www.sitefinity.com/documentation/ApiReference/topic214493.html

    Basically, in addition to the urlname I want to be able to save a public and private key.  What would be the easiest way to do that?  It doesn't look like you can add to that particular class, based on the members.  I want to save a setting for the feed, if that makes sense.  
  4. David C
    David C avatar
    33 posts
    Registered:
    02 Dec 2015
    14 Jan 2014
    Link to this post
    Hello Ben,

    I think I understand now what you are getting at, but let's try this another way if you don't mind. 

    Can you tell me specifically what you're trying to accomplish? Meaning, if you had the scenario you described below working, what would it do for you that you can't do without it?

    Reason I ask is there might be an easier way...

    Regards,
    David C
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    14 Jan 2014 in reply to David C
    Link to this post
    Hi David,

    The public and private key are the username and password  for accessing the feed.  I would like to be able to enter them in the backend of sitefinity and import the content from the feed.  Right now I have them hardcoded in the code and it works as intended, however I would like to be able to add them in the backend rather than diving into the code for ease of use by others.

    Does this make sense?  I'm just looking to save settings.  It doesn't have to be in the RSS pipe settings class, so I don't see a reason why they could not be stored elsewhere.

  6. David C
    David C avatar
    33 posts
    Registered:
    02 Dec 2015
    15 Jan 2014
    Link to this post
    Ben,

    Thanks for your patience and the additional info. I'm chatting with a few colleagues about your request and looking into solutions, but in the meantime I just want to make sure I understand your requirements exactly while we look into it.

    The gist is that you have a rss feed that you want to automate importing data into. The problem is that to import the data you have to first provide the publishing point your public and private key that you mentioned below, which are your username/password combo. I'm assuming it's any role/user with rss editing rights in your case? Does it matter?

    To remedy this you have hard-coded the credentials into a custom rss pipe class and you want to store the key data in the backend and then pull that data into your custom import, to make it a bit more functional for other end users?

    Sound about right? Again, we're currently looking into options, but just want to make sure we're on the same page.

    Regards,
    David C
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    15 Jan 2014 in reply to David C
    Link to this post
    Hi David, 

    You have the right idea.  It doesn't particularly matter right now about who has editing rights, and I haven't made a custom class for the RSS pipe, I just wrote hard coded the keys into the code that calls the class.  But yes, you have the right idea.  I would like to streamline the process by being able to enter these keys in the backend and reference them in the code rather than having to go into the code itself.

    Best,
    ben
  8. David C
    David C avatar
    33 posts
    Registered:
    02 Dec 2015
    15 Jan 2014
    Link to this post
    Hi Ben,

    I was talking with my resident pipe expert and he's kind of stumped as to why you need to provide these keys to add data into the rss feed. This is sorta paraphrased from a convo we just had:

    As I understand it, he'd like to add 2 more fields in rss pipe class, which would keep the user/pass and then he'd like to pass these as login credentials somewhere. That's what I'm trying to figure out... What sort of authentication is expected from sitefinity and how it should be passed. By default AFAIK it doesn't require a login. RSS is just XML that's being rendered.

    This leads me to believe that we're still not on the same page exactly. So do you mind:

    1. Telling us if this tool is external to Sitefinity?
    2. Provide the code you've been using, so we have a sample to work off of?

    Thanks again for your patience.

    Regards,
    David C
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    15 Jan 2014 in reply to David C
    Link to this post
    Hi David,

    The issue is that the feed (which is XML, technically not RSS) is user and password protected.  so if you try to navigate to it or access it programmatically you need to provide the username and password.  Obviously as I said I can hard code these but I would like to be able to save them in sitefinity.

    If I'm not being absolutely clear, there's no need for the data to be saved anywhere specific.  So I guess the question is what's the easiest way to save custom fields in the backend of sitefinity?  Being associated with RSS doesn't really matter at this point.  All that matters is being able to save it and call it from code.

    I can provide the code if there's a not an answer you can point me to quickly for this.
  10. David C
    David C avatar
    33 posts
    Registered:
    02 Dec 2015
    15 Jan 2014
    Link to this post
    Hi Ben,

    The login requirement is what has us stumped a bit... Is the login protection a permission that you set yourselves via the administrative module permissions for the RSS feed? There are a bunch of options, but it's kind of hard to say exactly what you should do without seeing how you have it setup now. Need to know things like is this a widget, or a service? How is it getting run, manually or via a scheduled sync? Is it integrated into Sitefinity or is it an external tool that is publishing into Sitefinity?

    Having said that... You have a number of options you can use, but some will depend on your preferred security reqs. 

    Is this a custom widget you have built within Sitefinity? If so, then the easiest thing to do might be to set these keys in a designer using Thunder. Basically you can add custom fields that set properties in your widgets and these fields will have their data stored and accessible in your code at run time. If that's not secure enough for you, then you could also do something along the lines of setting the username only in the designer and then querying the user based on the UN to get the password . If this sounds like an option, but you are not familiar with this approach, let me know and I can guide you through the process. 

    Let me know about the above. I think we're close, but I need to clear up a few of the items I have listed.

    Regards,
    David C
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  11. Ben
    Ben avatar
    6 posts
    Registered:
    17 Dec 2012
    15 Jan 2014
    Link to this post
    Hi David,

    The feed is outside of sitefinity...  An external one.  On a separate server.  It sounds like Sitefinity Thunder may be the best option here, thanks for your assistance.

    Best,
    ben

11 posts, 0 answered