Storing Website Data with HubDB | Episode 6/10 | Getting Started With Content Hub for WordPress Devs

John from Ascend walks through HubDB, HubSpot's database tool. Learn how to import CSV data, add properties, and build dynamic pages without leaving the platform.
Hey everyone, this is John with Ascend and we're going to look at adding properties to our HubSpot properties theme. We're doing so with HubDB. In this tutorial there is way to have properties dynamically created with other dynamic data. There's hubdb and there's custom objects. For simplicity's sake we're going to stick with HubDB. But custom objects, what you need to know is that it's more powerful and it can interact with your CRM. Back to HubDB, we have all of our columns created and these columns are certain column types. For example, our description is rich text while our featured image is an image column type. And then we have text columns. All of these exist and are pretty self explanatory. The only thing that might trip you up is the column type of a foreign ID and that is basically just connecting to another HubDB table. And now that I've created all of the appropriate column types to correspond to my WordPress custom fields, I can go ahead and start inputting data. So here we are with a couple of properties input. I'd like to import the rest and I have a CSV file with all of the appropriate names and every column heading in the CSV is named the same as the column heading in the HubDB table. So it's going to be a seamless import. But if not you can map values pretty easily. I'll press import and I can either add to the table or I can replace all of the rows in the table I'm going to add and I'll choose a file. Okay, I've uploaded my property listing CSV now I'll press next and in the CSV I can see all of these columns are mapped appropriately, which is great. There are these columns right here and we'll look at these in just a second. For now I'm going to press import. Everything's done and great. 867-5309 drives in there and I mentioned that we need to make this dynamic in an earlier video so we can create dynamic pages with our property data. Now we can do this by going to Actions manage settings and we'll need to toggle both of these settings on the allow public API access and enable creation of dynamic pages. I can map these metadata columns with existing columns or I can wait and create new ones for the featured image column. There's already a featured image column that exists and this must be an image column type and that's for social sharing and snippet previews and everything else looks good. So I'll press save. And now we have a page title column and a page path column that exist. And I can see the page title. It's auto filled in because I've created this before. But what I've done is just copied the name over to be the page title and then the slug. I'll go ahead and copy the name into the page path and it makes everything lowercase and kebab case for me, which is great. And I'll tack on the city and the state to the end of the slug as well. California. And that looks good to go. So I am going to publish and now we'll look into creating our dynamic pages with this data in the next video.










