Set Page Title to a record value on a details page

Hey Tadabase Community!

Below, I’ll share how to set your Page Title to a record value on a details page.

Here’s how that will look.
2021-11-09_15-07-08

To do this, you’ll first need to find the fields slug ID. You can find this by editing the field in the Data Builder. In the image below, you’ll see that the field we are using called “Name” is field_104

Next, you’ll need to find your Component ID, as shown in the image below.

Finally, add the following code to the JavaScript of the page.

TB.render('component_ID', function(data) {
	$('title').html(data.record.field_ID);
});

IMPORTANT: Be sure to update component_ID and field_ID to your respective values as shown in the first two steps

4 Likes

@Chem do the regular page titles not work on when adding to the page settings? I have the following set, but my page title is still shows the page slug.

Hey @mdykstra, that setting doesn’t currently work, but you may add the following to the JavaScript of that page.

$('title').html('CS Dashboard');

This would be a good one to add to Snippets!