Cara Menampilkan Parent Title dari Sebuah Parent Gimana ya Kang? #225
Answered
by
taufik-nurrohman
yuliakbard
asked this question in
Q&A
-
Kalau menampilkan Induk Judul dari sebuah halaman kan tinggal pake |
Beta Was this translation helpful? Give feedback.
Answered by
taufik-nurrohman
Jul 15, 2022
Replies: 1 comment 2 replies
-
Manual mas: $folder = dirname($page->path);
if (
is_file($parent = $folder . '.archive') ||
is_file($parent = $folder . '.page')
) {
$parent = new Page($parent);
} else {
$parent = new Page;
}
echo $parent->title ?? i('Untitled'); Di versi 3.x.x nanti bakal ada metode echo $page->parent->title ?? i('Untitled'); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
yuliakbard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Manual mas:
Di versi 3.x.x nanti bakal ada metode
parent()
bawaan untuk mempermudah: