How do I create my custom home page at the root level for my site?
I'm integrating wagtail to my django project. As documented I try to plug my custom homepage model and create a new site record
... You’ll probably want to replace this with your own HomePage class -
when you do so, ensure that you set up a site record (under Settings /
Sites in the Wagtail admin) to point to the new homepage.
When I try to update my site's root settings, page explorer doesn't list my custom home page. And I'm unable to create a page from my model at the root level. When I delete the existing root page, then I'm totally stuck.
Any guidance will be appreciated. Thanks.
Update (resolved)
Thinking that my custom home page will be the root of my side, I had this setting parent_page_types = [] in my model. Removing it lets me add it as child to existing root, which I can point in my site as the root.
Note: This was answered in the question via an update, pasting below for future readers.
On the page model, setting parent_page_types = [] meant that this page could not be put under other pages. As the root page is also a page, it meant the home page could not be set correctly.
Removing it lets you it as child to existing root, which I can point in my site as the root.
Docs - Page.parent_page_types
Related
How to change home page content in DNN while creating a site itself.
I need to change different page. I created a new page and created Template. And I replaced inside Templates folder named (Default. page. template). But it is not working out. Provide me a better solution.
Probably the easiest way to do this is to create a site using the default template, edit that site to create your own site, and then save that as a site template (suitable named). You can then use that site template to create sites with the page structure that you want.
The default page template (I believe) is used when you create new pages using the the Pages UI. I don't believe that the default page template is used by the default site template.
If you have created a page and would like to apply a specific page template to the new page retroactively. To do this, go to the page that you want to change and append ?ctl=ImportTab to the url. That will bring up a dialog that allows you to change the emplate for a page with lots of options. It
I followed Official Wagtail Docs to integrate freshly installed Wagtail into existing Django project.
I added customized HomePage class in existing Django's models.py.
# myDjangoProject/models.py
class HomePage(Page):
template = "homepage.html"
content = RichTextField()
content_panels = Page.content_panels + [
FieldPanel("content")
]
Q1: In above screenshot, Why system default page Welcome to Wagtail is of Page TYPE, while newly created New Page is of Home page TYPE automatically ?
Q2: In above screenshot, Why Newly-created child page under system default page Welcome to Wagtail is of Home page surprisingly without any manual configuration ?
Q3: In above screenshot, why all newly-created pages automatically (no manual configuration required) inherited from my customized HomePage class in MyDjangoProject/models.py ? How is this reflected on source code level ?
The Page class is the base class of all page types in Wagtail, but normally it wouldn't be desirable to let users create pages that are of the type Page rather than something more specific, because there's no way to add new content fields to it. For this reason, the is_creatable attribute is set to false on Page, which means that new pages of that type can't be created through the admin interface. (This attribute is not inherited by subclasses, so any new page types you create will be is_creatable = True by default.)
The initial "Welcome" page is created as part of the migrations in the wagtail.core app. At this point, Page is the only page type that exists (since your HomePage model hasn't been defined yet), so that's the one Wagtail uses. It might seem a bit weird that the default page is not one that you can create yourself through the admin, but there's no real alternative (other than not providing a default page at all, which would make it harder for developers to see if their installation has worked).
(When setting up a brand new Wagtail project through wagtail start, the project template includes migrations to replace the initial Page instance with an instance of the supplied HomePage model, so in this case it's less confusing.)
After you defined your HomePage model, this became the only page type with is_creatable = True, and so the admin interface automatically selects this page type on adding a new page. When you add another page model alongside HomePage, you'll find that it prompts you to select a page type.
I am using Wagtail for an internal knowledge base. I would like all pages to default to 'Accessible to logged in users'.
This is possible on a page-by-page basis using the 'privacy' setting: http://docs.wagtail.io/en/v1.8.1/advanced_topics/privacy.html
How can I make this the default for all pages?
The privacy settings are inherited by all child pages so if you make your Homepage accessible to logged in users then all its children (i.e all pages) will also have the same privacy setting! Notice that by "Homepage" I mean the root page of your wagtail tree ie the first page that you see to its right after you click "Explorer" in wagtail admin (on single site wagtail setups).
I have a DNN 7 site. For new pages that are created in the portals, we want "All Users" to be checked under View Page by default.
How do we do this? I think I've found the right template file:
/Portals/_default/Templates/Default.page.template
But I can't find any documentation about the tags therein.
It does have:
<inheritviewpermissions>true</inheritviewpermissions>
But where are the view permissions inherited from? And how to override them?
Again, we want it so that new pages are viewable to all users by default; no need to go change anything after new page creation. (Yeah, I know, but that's the requirement.)
I am novice programmer to Dot net nuke.
Login as Admin:
1) I add a page in Home -- Department. Department page have on Text/HTML module which have some lines ie (Welcome to DNN.)
2) Now click on Home page then add this page (Control Panel --> Add existing module) to Home Page.
3) Now as we can modifying data of Department Page, either from Home page or from Home--> Department page, which will be reflecting on both pages.
4) We want that modify option (Edit Text) must be available with Home --> Department page only. There must not be no editing option at Home page to edit Department page.
How to do that?
I am using Sql Server 2008/DotNetNuke_Community_04.09.05_Source / ISS V5.1/ VS2008.
This isn't really possible in DNN, if you have the ability to EDIT a page, then you have the ability to edit any MODULE on that page, including modules that are copied from other pages.
You could remove the ability for the person to EDIT the homepage, and then only give them the ability to edit certain MODULES on the homepage instead.
FYI DotNetNuke is spelled without any spaces, and is actually now just DNN or DNNPlatform