How to fetch page document as a text for ajax purposes

Greg Woz asked on October 16, 2014 13:21

Hello,

I am trying to load dynamically content to FancyBox popup using Kentico. The way how I imagine this to work is that every Page contains a "Editable Text" web part so CMS users can edit it - and it is returned to my jQuery script as a plain text (or json) so I can embed its content to a JavaScript popup.

I've searched through the forum and found a bit of info about Rest services but it seem to complex and not sure if this is what I am looking for.

Also I am not sure if this is correct approach to solve the problem using Kentico - but I want be able users to edit the popup content and don't know how to do this otherwise.

Can you advice please?

Recent Answers


Brenden Kehren answered on October 16, 2014 13:47

If you used a page type it would be much easier than a Editable Text webpart simply because you can query that data very easy with the API or RESTful services. If you use an Editable text webpart retrieving that data is a bit harder and not as robust as using a page type.

RESTful services simply need to be enabled within Kentico with the check of a box. From there you'll want to ensure some security is setup but they are documented well and as I mentioned easy to setup.

0 votesVote for this answer Mark as a Correct answer

Greg Woz answered on October 16, 2014 14:27

Hello,

Thanks for your answer. I am pretty newbie in Kentico. What you mean by Page Type?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 17, 2014 06:34

You might want to read up on what Kentico is and can do then before you start using RESTful services to try to get data. Page Types or historically Document Types, are what Kentico revolves around. Its what you create within the UI for your content holders. Technical terms, database table and columns with rows of data.

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on October 17, 2014 15:16

Hi Greg,

Please also take a look at our Documentation about Page types and general website data structure.

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.