문제

다른 모든 페이지가 기본 제목을 가져와야하지만 제품 세부 정보 페이지의 경우 특정 제목이 필요합니다. 지금 까지이 코드를 추가하려고 시도했습니다

<h3><?php echo $this->getLayout()->getBlock('head')->getTitle();?></h3>-->>This is for common title
<?php if(Mage::registry('current_product')) ?>
<h3><?php echo "Feaured Products";?></h3>-->>this if for product detail page title.
<?php endif; ?>
.

그러나이 방법으로 내 페이지를 충돌시킵니다.

도움이 되었습니까?

해결책

세미콜론을 잊어 버렸습니다.

<?php if(Mage::registry('current_product')) ?>
.

이어야합니다

<?php if(Mage::registry('current_product')) : ?>
.

개발시 오류보고 및 개발자 모드를 켜십시오.이렇게하면 코드에 문제가 있는지 명확한 메시지가 나타납니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top