How can I put this button pattern inside another pattern, so that if I wanted to show the pattern and if I didn't want to show it?
Topic on Project:Support desk
Appearance
I don't understand what you're asking. Could you clarify what you want?
Yes, thank you
More explanation:
I want to have buttons on some pages and not buttons on some pages.
How do I show or not show a button in a template consisting of several patterns?
Thanks
When do you want the button to show up? If it is something on the page, I think you could do this with some JS in your Common.js.
Thank you for your response
I want some pages to be just syntax and some pages to be syntax with buttons.
How can I fix this problem?
"Some pages to be just syntax" -- could you point to an example on your wiki where you want this to happen? I still don't understand your question. It looks like you know how to make buttons (you made a couple here), why can't you do that on your wiki?
Yes, an example was created on Wiki
Note that the first example is with the button
And
The second example is without a button
The above examples are shown with two patterns.
My question is how can I show both of the above examples by creating a template
Thanks
If you want to include or exclude the button on a per-page basis, maybe you can try employing the ##if parser function used on Magic words#Page names in your template.
Something like: For two pages Page_A
, Page_A_with-button
If {{PAGENAME}} includes the word button
(can be checked using ##explode:), then allow button to be displayed otherwise not.
In case these patterns are to be included in the same page, simple if conditional statements should work.
Thank you for your guidance
It would be great if you could give an example
thank you
Do you want the button inclusion/exclusion on a per-page basis or is it that there would be some elements with button and others without the button on the same page?
is it that there would be some elements with button and others without the button on the same page