SaaS CMS has officially launched! Learn more now.

Dynamic Content

Vote:
 

Hello,

So I am trying to get some dynamic content in my site. So I would have a page which would show some data coming from server which would be dynamic. Should I use Blocks or use Dynamic content option?

My data source would probably be some api hosted somewhere else. 

#184869
Nov 06, 2017 14:54
Vote:
 

Dynamic content is deprecated and will be phased out in the future.

Source: http://world.episerver.com/documentation/developer-guides/CMS/dynamic-content/

#184870
Nov 06, 2017 15:08
Vote:
 

So you are suggesting using Block? If yes, do you know a link to some tutorial for that? 

#184871
Nov 06, 2017 15:21
Vote:
 

Well, if you have to choose between Blocks and DynamicData, I would go for Blocks.

You can take a look at Alloy project.
You basically need a block controller (for fetching data from external service) and a block view.

If the fetched content has a fixed position on your page(s), there's no need for drag&drop, etc. then you could solve this with a page property (show/hide data from ...) and to the fetching in page controller (or some IService that is injected in your page controller).

In any case, I would consider caching the data with ISynchronizedObjectInstanceCache http://world.episerver.com/documentation/developer-guides/CMS/caching/Object-caching/

Hope this helps!

#184872
Nov 06, 2017 15:48
Vote:
 

Basically I don't have to choose between the two. The issue is that I am fairly new to episerver and the client wants the project fast. So I am doing and learing. 

The scenario I am going to have is that I would show user a list of reports coming from some api end point. So probably create a page here by defining a new page type?

Then when the user click on a particular report he will be taken to a separate page. In that page he will see info related to that report. So I was thinking of creating some block here. 

What I am most confused about is creating multiple page types just to create a single page out or them. So in the above case I would have one page type for list of reports, one for report overview and so on and so forth.

Did you got what am I saying? 

#184879
Nov 06, 2017 20:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.