Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

“If category is” conditionals
 
Yordan
Jr. Member
 
Total Posts:  1
Joined:  2008-07-23
 

Hi there,

Has anyone been able to implement a conditional to check which category is on and display different content based on that but which isn’t included in the category fields? For example, I’ve tried the following code but with no effect:

<?php $_catnm$this->getCurrentCategory()->getName(); ?> 
                 <?php 
if ($_catnm=="gifts"): ?> 
                    
<p>Success</p>    
                 
<?php endif; ?>

Your help will be much appreciated!! Thanks!

Yordan

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top