Feed.xml bisa di custom kah kang? #227
Unanswered
yuliakbard
asked this question in
Q&A
Replies: 1 comment
-
Bisa tapi melalui kait. Tidak ada cara khusus: if ('feed.xml' === basename($url->path ?? "")) {
Hook::set('content', function ($content) {
$doc = new DOMDocument;
$doc->loadXML($content);
foreach ($doc->getElementsByTagName('item') as $v) {
$link = $v->getElementsByTagName('link')->item(0).nodeValue;
$new = $doc->createElement('asdf');
// Append `<asdf></asdf>` to current `<item></item>`
$v->appendChild($new);
}
return $doc->saveXML();
}, 20);
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ane mau custom bagian elemen
<item></item>
karena padafeed.xml
yang muncul di website ane masih bagian halaman folder nya, rencananya mau di looping sekali lagi, source nya dari$page->url
, apa bisa di Hook aja nih kang? atau edit di extension nya?Beta Was this translation helpful? Give feedback.
All reactions