0

I would like to get Tridion Page content from Broker DB using DXA 1.7 Java Framework.

I do not want to have views in my application. This means I will not have View Model Mapping in my application. I just have to retrieve the Page content based on the page URL. Can someone help me on my request?

0

The statement “I do not want to use Views or View Models in my DXA web app” sounds like a contradiction, since MVC Architecture is at the heart of DXA. If you really don’t want to use either, it sounds like you don’t want to use DXA.

However, maybe you do want to use View Models, but don’t want to use server-side rendering, so no server-side Views?

Such a configuration is possible in DXA:

  • A DXA Web app can serve the raw data of the View Model in JSON format (try suffixing the URL with ?format=json)
  • If you only request the View Model JSON, you don’t need (server-side) Views in your web app
  • However, DXA’s View Model mapping works through View names. So, you will still have do define (virtual) View names, but those Views don’t have to actually exist.
0

You can always get the page content directly via the Content Service. See Content Service API for more details. You will need to programatically send a request to the service and parse the result.

If the Content Service is protected, then you will have to do an additional step and acquire the auth token which you will need to include in the request to the Content Service, the process is explained here

  • 1
    Instead of using the Content Service (OData V2 endpoint) directly, you can also use the CIL. That will take care of Discovery Service lookup and OAuth security for you. – Rick Pannekoek May 30 '18 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.