-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New command: spo page header remove
#6541
Comments
Good suggestion. Since it's a remove command, let's add a |
@waldekmastykarz I have added the option to the description. I can take this one as well :) |
Hi @mkm17, is there a difference between this command and |
Hi @milanholemans as I can see |
@milanholemans, @waldekmastykarz, @mkm17 sorry for coming late to the party, due to my short break but I have a few comments/questions here. This may be a bit tricky command and very specific and I will try to explain why: This is a bit tricky. If this would change in future by MS this command will just break as our condition to get the page header will just not work anymore. I propose we should look at a bit more reusable feature. Let me know what do you think. |
@Adam-it ok, adding the Instead of creating a separate command to remove the header, we could update the existing header set command to allow setting the type to 'None' (as @milanholemans thought it works) and change the current I also agree that we can make the page part of the solution more reusable. As mentioned in this comment, it seems that some page commands use the Ok, so the plan is:
|
I wonder what @mkm17, I'm afraid that updating |
@milanholemans it is possible to have a full-width without a banner webpart. It does not make sense but it is possible. You may remove the webpart and save the page with empty section. In this case we should also somehow allow to remove it using our command(s).. that's why it is tricky
yes it will be a breaking change. Lets not do it. Also it does not seem clear to me as well.
@mkm17 yes this seems that is something that was overlooked from out end. If possible we could refactor and fix it up as well
@mkm17 yes I think we should create a @pnp/cli-for-microsoft-365-maintainers any other feed? |
Should we really remove an empty section? You cannot see it on the page anyway, and if the section is empty, is actually a section, and not a page header, right? |
that's why I am saying it is tricky and very specific case. and that is exactly why I propose we rather develop |
In my opinion, that would also mean that we should get rid of the |
Hmm, are there any statistics on how often certain samples are viewed? Maybe we can check if there is interest in this type of action and, after some time, decide whether to turn it into a proper command. If the new commands |
Yes, we can check the analytics of our docs to see how many times a particular page has been viewed. |
Ok so it seems we have a plan right? |
Usage
m365 spo page header remove
Description
Removes a modern page header
Options
-n, --pageName <pageName>
-u, --webUrl <webUrl>
-f, --force
Examples
Remove the page header
Default properties
No response
Additional Info
Currently, we can remove a header from the modern page. From what I observed in the internal structure of the page, it is defined as a banner web part in the full-width section.
The idea is to remove the first section of a page if the full-width section contains a banner web part.
The text was updated successfully, but these errors were encountered: