Jump to content

Manual talk:Page content models

Add topic
From mediawiki.org
Latest comment: 5 months ago by Wladek92 in topic dead 404 link on ContentHandler

Incomplete example

[edit]

Where should be the placed the code to write the goat name in dababase in the provided example. Is it with Manual:Hooks/EditPage::attemptSave:after but I have to use $_POST and I do not how how to code preview that should not update database. Samuelboudet (talk) 08:47, 9 April 2023 (UTC)Reply

Can you clarify a bit more what is needed? First of all, I think you can convert an already-existing page to your "goat" content model. This can be done from the "info" page. That answers your need, since it's then written in the database, so it triggers your custom "goat renderer". Valerio Bozzolan (talk) 09:42, 2 August 2023 (UTC)Reply
[edit]

In the first paragraph :

Please correct or suppress. Thanks. --Christian 🇫🇷 FR 🚨 (talk) 14:25, 21 March 2025 (UTC)Reply

@Wladek92: Fixed. Sam Wilson 01:51, 22 March 2025 (UTC)Reply
@Samwilson sorry gives -> https://doc.wikimedia.org/mediawiki-core/master/php/class_1_1MediaWiki_1_1Content_1_1ContentHandler.html and does not work; can you check again ? thanks. -- Christian 🇫🇷 FR 🚨 (talk) 08:09, 22 March 2025 (UTC)Reply
@Wladek92: Oops, you're right! I even tested it after fixing it, but then after testing I decided it needed a leading slash. Of course, it doesn't need that slash, and it breaks the link. Fixed now (I hope). :-) Sam Wilson 09:36, 22 March 2025 (UTC)Reply
pretty fine, on Fr page too. Thanks. --Christian 🇫🇷 FR 🚨 (talk) 14:59, 22 March 2025 (UTC)Reply