Type of content on page load

Hi guys. I’m trying to set the data source for a page on page load and am wondering if there’s an easy way to do this?

I know I can select type of content but I’d like to select the data source on page load as well.

For example:

  • My app has several companies (I have a company set as a data type and a company has a company name)
  • I need individual pages of my app to display company specific content and I need that content to appear on page load. The user can not be asked to select a company or navigate to the company specific page from another page.
  • I do not want to tie companies to users

In my example above, Is there a way to display company X content on page load?

Thanks!

You misunderstand.

If “Company” is a Thing (a custom data type in your db), a page which you set to be of type Company does exactly what you want.

How does the page know which Company’s data you want to present?

It gets that from the URL. The last part of the URL is the Unique ID of the company you want to use.

So, let us say Company with name “Dingleberries Department Store” has Unique ID 1234x5678.

And your page of type company is /store-info.

And your app is at https://crazystores.com

The URL for Dingleberries is:

https://crazystores.com/store-info/1234x5678

Thanks for your help, Keith!!

This topic was automatically closed after 70 days. New replies are no longer allowed.