如何在magento中对特定页面应用条件? [英] How to apply condition for specific page in magento?

查看:66
本文介绍了如何在magento中对特定页面应用条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对来自url的特定页面应用条件.它既不是类别页面也不是自定义cms页面.网址类似于localhost/project/index.php/news/blog.html.我想对此"news/blog.html"应用条件.新闻或博客不是类别,也不是任何cms页面.有人可以帮我吗?

I want to apply condition for specific page coming from url. It is neither a category page nor a custom cms page. Url is like localhost/project/index.php/news/blog.html. I want to apply condition for this 'news/blog.html' . News or blog is not a category and not any cms page. Can anybody help me?

推荐答案

使用以下代码.

Mage::app()->getRequest()->getControllerName();

它将为模块指定控制器名称.输入名称的条件,然后编写代码.它肯定会工作.

It will give controller name to your module. Put consition for this name and write your code. It will work for sure.

这篇关于如何在magento中对特定页面应用条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆