How to inline a database? #319
Answered
by
mariosimao
philippe-pixieset
asked this question in
Q&A
-
This is basically what I'm doing: $page = Page::create($parent)
->addProperty('property', RichTextProperty::fromString('hello'))
->addProperty('property', RichTextProperty::fromString('world'))
;
$page = $notion->pages()->create($page);
$parent = DatabaseParent::page($page->id);
$database = Database::create($parent)
->changeTitle('Title')
->changeProperties([
DatabaseTitle::create('My Title'),
])
;
$database = $notion->databases()->create($database); My issue is that it creates a page which contains a link to the database. I just want to be able to inline the database in its parent page. It seems like |
Beta Was this translation helpful? Give feedback.
Answered by
mariosimao
Jul 19, 2024
Replies: 1 comment
-
Hello @philippe-pixieset sorry for the late reply, I think GitHub did not notify me. To create an inline database, you should use the $database = Database::create($parent)
->changeTitle('Title')
->enableInline()
->changeProperties([
DatabaseTitle::create('My Title'),
]); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mariosimao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @philippe-pixieset sorry for the late reply, I think GitHub did not notify me.
To create an inline database, you should use the
enableInline()
method.