简体   繁体   English

更改Magento CMS主页

[英]Change Magento CMS Home page

I am using this groupon clone from contus 我正在使用contus的groupon克隆

I am try to change the cms home page .Which as what i have observed can be found in 我尝试更改cms主页 。正如我所观察到的,可以在

System > Configuration > Web > Default Pages 系统>配置>网站>默认页面

I tried changing the CMS Home Page .i chose the template that i made in 我尝试更改CMS主页 。我选择了我制作的模板

CMS > Pages CMS>页面

I am expecting the template to be loaded .and ugh after several tries, clearing the cache and even changing the Default Web URL into the templates URL Key .it didn't work 我期望在几次尝试后加载模板,然后,清除缓存,甚至将默认Web URL更改为模板URL Key。它不起作用

any suggestions? 有什么建议么?

Here's a screenshot of the default cms_home_page 这是默认cms_home_page的屏幕截图

在此处输入图片说明

I tried editing the config.xml in the 我尝试在中编辑config.xml

app\\code\\core\\Mage\\Cms\\etc 应用程序\\代码\\核心\\法师\\ CMS \\等

I changed the default > web > default > cms_home_page node into the coming-soon URL key .Still didn't work 我将默认> web>默认> cms_home_page节点更改为即将到来的 URL密钥。仍然无法正常工作

I can access the http://127.0.0.1/mg/coming-soon/ page and the http://127.0.0.1/mg/home/ page as well .I just wonder, why the settings i applied in the admin (and can also be seen in the db) doesn't work. 我也可以访问http://127.0.0.1/mg/coming-soon/页面和http://127.0.0.1/mg/home/页面。我只是想知道,为什么我在管理员(并且也可以在db中看到)不起作用。

you can simply go to system >> configuration >> and click on the web which is left in your window under general. 您只需转到系统>>配置>> ,然后在常规下单击窗口左侧的网络即可

than click on Default Pages and set CMS Home Page 比点击默认页面并设置CMS主页

Second thing, You have to do "enable" this page and you can do it from cms >> pages and click on the page which you have selected, than set status >> enable 第二件事,您必须“启用”此页面,并且可以从cms >>页面执行此操作 ,然后单击您选择的页面 ,然后设置状态>> enable

Just to answer to those who reach this page; 只是为了回答那些到达此页面的人;

If you see this behaviour you should check the store switcher in your top left. 如果您看到此行为,则应检查左上方的商店切换台。 Choose your store and check the config for it. 选择您的商店并检查其配置。

Probably it's not using the default settings and overriding the global scope. 可能不是使用默认设置,而是覆盖了全局范围。

The unique identifier in the CMS > Manage Content section just needs to be a unique string in the context of a store view. 在商店视图的上下文中,“ CMS”>“管理内容”部分中的唯一标识符只需是唯一字符串。 You should NOT use the frontname of a core module there (eg "cms"). 您不应在其中使用核心模块的名字(例如“ cms”)。 Change your url key to something unique, and head to System > Configuration. 将您的url键更改为唯一的键,然后转到“系统”>“配置”。 Select Web. 选择网站。 As long as the Default Web URL is set to cms , cms/index , or cms/index/index you should be able to simply choose the desired CMS page from the Default Web URL dropdown. 只要将默认Web URL设置为cmscms/indexcms/index/index您就可以简单地从“ 默认Web URL”下拉列表中选择所需的CMS页面。 Make sure you check other configuration scope settings (dropdown at top left) in case there is a rude setting set at a lower level. 如果在较低级别上设置了粗鲁的设置,请确保检查其他配置范围设置(左上角的下拉菜单)。

FYI, what you "make" in the Manage Pages section are routes with content as opposed to "templates" (in Magento parlance). 仅供参考,您在“管理页面”部分中“制作”的是带有内容而不是“模板”的路由(用Magento的话来说)。 Templates are PHTML files under app/design . 模板是app/design下的PHTML文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM