D
D
DrunkMaster2018-02-19 11:00:45
JavaScript
DrunkMaster, 2018-02-19 11:00:45

How can I make sure that only the content block is reloaded?

I saw a site on Drupal where such an implementation was made:
There is a page, on the page there are buttons conditionally "previous product", "next product" and when you click on it, only the block with content changes (i.e. product, photo and its characteristics), and the header, footer and menu are not reloaded, while it is clear that the page address changes in the browser bar. The code looked, visible frameworks such as angular, vue is not used.
How to implement this? The content is clear, you can load it with an AJAX request and change the entire DIV, but how else can you change the page address?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marataziat, 2018-02-19
@marataziat

You can write a fancy app in Vue/Angular/React.js, or you can just take it easy and just grab what you need from the backend via the REST API + JQUERY :3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question