Hi! I have a question. I created a dynamic posts page. Now I am trying to connect a text block to the database. But text formatting is not saved? Is that right?
Hi!
The API described in this post allows you to customize the post page itself. You don’t need to create dynamic pages, you can use the internal page of the blog which called “Post” and customize it using the API. (this is what was done in the screenshot above).
Please contact me if you have any further questions
@maya-ekron Hi again! Thanks for your help, it works
But I got the problem.
I changed the post page. I use the page title that I get using getPost. I also added post navigation. When I open a post for the first time - OK, the title gets the value. But if I use navigation inside the post, the title does not update its value. The post page does not reload?
You need to do the action of changing the post twice - when the page loads and when navigating to another post (the second one you achieve using wixLocation.onChange).
Please let me know if you have any other questions.
@maya-ekron So is it not possible to connect the text block in the database and keep the formatting? Or is it that if I want thee nice formatting it can’t create my own dynamic page, I have to use the original post page?
Correct, it is not possible to bind a text block to the data and keep the formation, therefore if you want to have your own design you must use the existing post page with the post page API.
Is it possible to access this API through a REST interface? I would like to automatically add/update forum topics with data from another site. Please let me know if this is possible and if any examples of this exist anywhere?
Hi Arthur,
getPost() is a read only function, which can be accessed only from Corvid and can be used only in Blog post page. Unfortunately, updating or creating posts is not possible at the moment.