I am creating a Ecommerece application in React/Next Js. I want create dynamic routing with different peramaters for both product detail page and category page.
for Example if I click on category then its routing will be
https://www.mywebsite.com/my-category-page-url
If i click on any product from that category then its routing will be
https://www.mywebsite.com/my-product-detail-page-url
Note: I have already a live website with daily 30K visitors and with different tech stack which follows same url structure so I can not change the url structure.
Related
Im not sure im in the right place, but ill still ask.
I have a single page app writen in React and an html landing page writen is pure html and css. The two have different css and nothing in one depends on the other. My question is how can I structure the website files in a way that the landing page loading times are very fast and the react app is also acessible? I want to user Firebase Hosting for it.
I created some pages with a hierarchy like Home(with child pages), About US, Contact How can I fetch the current page in lwc template?
Are there ways to fetch all the available pages in the community using the same template? Or is there any API object for the page name I can pass?
Thanks
I need to give any page in my website a unique ID to be detected in google analytics or firebase analytics.
I will explain:
First of all, I'm developing using React.js.
I have lots of pages (routes) on my website. for example:
https://mywebsite.com/website1
https://mywebsite.com/website2
https://mywebsite.com/website3
In someday, I will change the route of the page and I want to keep detect the analytics data from the history using API.
Because of that, I need to set a constant ID for each page to be detected no matter what the route is.
You can do it by creating a datalayer variable - if you kept the datalayer the same on the page (even if the URL is different) you can send the variable as a custom dimension to Google Analytics. You can then report on that custom dimension as if it was a page.
I am designing a landing webpage that houses many "content_types" ie templates.
The webpage has:
- TESTIMONIALS
- REVIEWS
- RATINGS
-AboutUs and many other sections.
From STRAPI, we have different APIs for testimonials, reviews, ratings etc.
Should my landing page call multiple APIs ie getTestimonials, getReviews, getRatings for that page?
Or should I create a COMMON API with all the content and call that like getContentForLandingPage and load all in one go?
What is a suggested practice?
You can create a new ContentType LandingPage with all relations.
I have a blog built in Drupal8 with more than 10K articles. I would like to implement the article listing and pagination in ReactJS. How can I do this ?
First you should understand difference between, SPA (single-page application) and MPA (multi-page application).
Drupal generates pages in the back-end and sends to user (browser). ReactJS is a library to make SPA, which different from Drupal. You can use React with MPA, but it's a bit tricky.
You can use jsonapi get the data from Drupal.