#2 Page.RemoveTemplateParameter

Unstable (example)

New method for Page class that removes a parameter from a template in a wikipage. It is modeled on SetTemplateParameter and reuses much of the same code, but instead of setting a new value for a parameter, the parameter is removed from the page.
templateTitle: template in which to remove a parameter
templateParameter: the parameter to be removed
firstTemplateOnly: if true, only first instance of template, if false all.

If the template or parameter doesn't exist, no action is taken.


  • Lsjjsllsjjsl

    Lsjjsllsjjsl - 2012-07-20

    C# source, to be inserted in DotNetWikiBot.cs

  • CodeDriller

    CodeDriller - 2012-07-20
    • status: open --> open-accepted
  • CodeDriller

    CodeDriller - 2012-07-20

    Thank you. That function can be very useful.

    I have one question. Why did you change
    site.FormatTemplate(templateTitle, parameters, template);
    site.FormatTemplate(templateTitle, parameters, false, false, 0);

  • Lsjjsllsjjsl

    Lsjjsllsjjsl - 2012-07-20

    The FormatTemplate change was for my own lazy reasons, I wanted to reformat the templates in the same run. Then I forgot to change it back before submitting it here. Better change it back to the original form site.FormatTemplate(templateTitle, parameters, template) before any general release. Should have no effect on the main function of this Method.

  • CodeDriller

    CodeDriller - 2015-01-24

    RemoveTemplateParameter(string templateTitle, string templateParameter, bool firstTemplateOnly) method was added in v3

  • CodeDriller

    CodeDriller - 2015-01-24
    • status: open-accepted --> closed-fixed
    • Group: --> Unstable (example)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks