I'm having trouble putting the cmsplugin_blog app at the first page in django-cms.
我在将cmsplugin_blog应用程序放在django-cms的第一页时遇到了麻烦。
The problems are, among others, that the URL doesn't show the page name, so there are several issues with links to articles and internationalization that don't show up otherwise.
问题包括URL没有显示页面名称,因此有几个问题,链接到文章和国际化,否则不会显示。
Is it possible to have django-cms redirect to the first page in the menu (let's say /blog/) when asked for the root?
当被问到root时,是否有可能让django-cms重定向到菜单中的第一页(让我们说/ blog /)?
2 个解决方案
#1
1
All Django CMS page can be hooked to an application module, like your Blog. Have a look at the documentation for App Hooks: http://docs.django-cms.org/en/latest/extending_cms/extending_examples.html#my-first-app-apphook
所有Django CMS页面都可以连接到应用程序模块,例如您的Blog。看一下App Hooks的文档:http://docs.django-cms.org/en/latest/extending_cms/extending_examples.html#my-first-app-apphook
After you set up a cms_app.py for your blog, you should be able to set your Blog application as the Application for your home/first page in the advanced menu of the CMS page change view.
为博客设置cms_app.py后,您应该可以在CMS页面更改视图的高级菜单中将博客应用程序设置为主页/首页的应用程序。
Hope that helps you out.
希望能帮到你。
#2
0
Try the Advanced Settings of the Page menu. There should be a "redirect" field where you can select your blog's root page. Do this for your first page.
尝试页面菜单的高级设置。应该有一个“重定向”字段,您可以在其中选择博客的根页面。为您的第一页执行此操作。
What happens is that the root page is replaced by an http redirect and the browser will show your blog's page.
会发生什么是根页面被http重定向替换,浏览器将显示您的博客页面。
#1
1
All Django CMS page can be hooked to an application module, like your Blog. Have a look at the documentation for App Hooks: http://docs.django-cms.org/en/latest/extending_cms/extending_examples.html#my-first-app-apphook
所有Django CMS页面都可以连接到应用程序模块,例如您的Blog。看一下App Hooks的文档:http://docs.django-cms.org/en/latest/extending_cms/extending_examples.html#my-first-app-apphook
After you set up a cms_app.py for your blog, you should be able to set your Blog application as the Application for your home/first page in the advanced menu of the CMS page change view.
为博客设置cms_app.py后,您应该可以在CMS页面更改视图的高级菜单中将博客应用程序设置为主页/首页的应用程序。
Hope that helps you out.
希望能帮到你。
#2
0
Try the Advanced Settings of the Page menu. There should be a "redirect" field where you can select your blog's root page. Do this for your first page.
尝试页面菜单的高级设置。应该有一个“重定向”字段,您可以在其中选择博客的根页面。为您的第一页执行此操作。
What happens is that the root page is replaced by an http redirect and the browser will show your blog's page.
会发生什么是根页面被http重定向替换,浏览器将显示您的博客页面。