How to call cms block of block type into custom headervertical menu every page & Header menu navigationHow to use filters on custom product listing?Passing variables into a CMS blockInsert an unset block in a CMS page (at a particular position)magento home page block not workingCustom filter in the sales order admin grid giving Invalid block tCalling to custom block from cms page display blank pageHow to call CMS blockProblem Loading Custom phtml into CMS pageCms block custom field
Second 100 amp breaker inside existing 200 amp residential panel for new detached garage
Methodology: Writing unit tests for another developer
Designing a magic-compatible polearm
Should I include an appendix for inessential, yet related worldbuilding to my story?
How do I remove this inheritance-related code smell?
How hard is it to distinguish between remote access to a virtual machine vs a piece of hardware?
Is there any proof that high saturation and contrast makes a picture more appealing in social media?
What happened to Hopper's girlfriend in season one?
Where should a runway for a spaceplane be located?
Is declining an undergraduate award which causes me discomfort appropriate?
Rejecting an offer after accepting it just 10 days from date of joining
Print one file per line using echo
Going back in time in and initial value problem
What is the "ls" directory in my home directory?
In the US, can a former president run again?
What was the flower of Empress Taytu?
Can I enter the UK for 24 hours from a Schengen area, holding an Indian passport?
What is the highest voltage from the power supply a Raspberry Pi 3 B can handle without getting damaged?
Dmesg full of I/O errors, smart ok, four disks affected
When Bnei Yisroel travelled in the midbar, what happened on Shabbos?
Extending prime numbers digit by digit while retaining primality
Why is it easier to balance a non-moving bike standing up than sitting down?
Warnings using NDSolve on wave PDE. "Using maximum number of grid points" , "Warning: scaled local spatial error estimate"
What is "industrial ethernet"?
How to call cms block of block type into custom header
vertical menu every page & Header menu navigationHow to use filters on custom product listing?Passing variables into a CMS blockInsert an unset block in a CMS page (at a particular position)magento home page block not workingCustom filter in the sales order admin grid giving Invalid block tCalling to custom block from cms page display blank pageHow to call CMS blockProblem Loading Custom phtml into CMS pageCms block custom field
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've made code of most viewed products which I'm trying to call under custom header. This is what I've done so far.
Posted the block code under cms block by name 'most_viewed'.
block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml"
and then I've posted the below code under my custom header but it's showing block. Suggest me some good idea to do.
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('most_viewed')->toHtml(); ?>
magento-1 phtml header cms-block
|
show 2 more comments
I've made code of most viewed products which I'm trying to call under custom header. This is what I've done so far.
Posted the block code under cms block by name 'most_viewed'.
block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml"
and then I've posted the below code under my custom header but it's showing block. Suggest me some good idea to do.
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('most_viewed')->toHtml(); ?>
magento-1 phtml header cms-block
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24
|
show 2 more comments
I've made code of most viewed products which I'm trying to call under custom header. This is what I've done so far.
Posted the block code under cms block by name 'most_viewed'.
block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml"
and then I've posted the below code under my custom header but it's showing block. Suggest me some good idea to do.
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('most_viewed')->toHtml(); ?>
magento-1 phtml header cms-block
I've made code of most viewed products which I'm trying to call under custom header. This is what I've done so far.
Posted the block code under cms block by name 'most_viewed'.
block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml"
and then I've posted the below code under my custom header but it's showing block. Suggest me some good idea to do.
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('most_viewed')->toHtml(); ?>
magento-1 phtml header cms-block
magento-1 phtml header cms-block
edited Jun 11 at 18:35
sv3n
10.1k62557
10.1k62557
asked Apr 9 '15 at 18:02
Shoeb MirzaShoeb Mirza
181213
181213
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24
|
show 2 more comments
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24
|
show 2 more comments
1 Answer
1
active
oldest
votes
According to discussion with you.you need to do this by using layout xml
Home handler: cms_index_index
is unique
for homepage.
Suppose
that the name of custom header
is customheader
then you can define the most_viewed by
<cms_index_index>
<reference name="customheader">
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
Then you need call this block by using getChildHtml(BlockNameATXmlCOde)
<?php echo $this->getChildHtml('product_homepage');?>
Please put this code at cms.xml or local.xml at app/design/frontend/YOUR_PAcakage/YOUR_TEMPLATE/layout/
If you using layout code then no need to cms block
Hi you need to change reference name custom header
<reference name="header"> <block type="page/header" name="customerheader"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block></reference>
Then accordingly you need to change most view block reference block name
<cms_index_index>
<reference name="customerheader"> <!-- here parentblock name which is define at above xml -->
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
|
show 1 more comment
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f63221%2fhow-to-call-cms-block-of-block-type-into-custom-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
According to discussion with you.you need to do this by using layout xml
Home handler: cms_index_index
is unique
for homepage.
Suppose
that the name of custom header
is customheader
then you can define the most_viewed by
<cms_index_index>
<reference name="customheader">
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
Then you need call this block by using getChildHtml(BlockNameATXmlCOde)
<?php echo $this->getChildHtml('product_homepage');?>
Please put this code at cms.xml or local.xml at app/design/frontend/YOUR_PAcakage/YOUR_TEMPLATE/layout/
If you using layout code then no need to cms block
Hi you need to change reference name custom header
<reference name="header"> <block type="page/header" name="customerheader"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block></reference>
Then accordingly you need to change most view block reference block name
<cms_index_index>
<reference name="customerheader"> <!-- here parentblock name which is define at above xml -->
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
|
show 1 more comment
According to discussion with you.you need to do this by using layout xml
Home handler: cms_index_index
is unique
for homepage.
Suppose
that the name of custom header
is customheader
then you can define the most_viewed by
<cms_index_index>
<reference name="customheader">
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
Then you need call this block by using getChildHtml(BlockNameATXmlCOde)
<?php echo $this->getChildHtml('product_homepage');?>
Please put this code at cms.xml or local.xml at app/design/frontend/YOUR_PAcakage/YOUR_TEMPLATE/layout/
If you using layout code then no need to cms block
Hi you need to change reference name custom header
<reference name="header"> <block type="page/header" name="customerheader"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block></reference>
Then accordingly you need to change most view block reference block name
<cms_index_index>
<reference name="customerheader"> <!-- here parentblock name which is define at above xml -->
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
|
show 1 more comment
According to discussion with you.you need to do this by using layout xml
Home handler: cms_index_index
is unique
for homepage.
Suppose
that the name of custom header
is customheader
then you can define the most_viewed by
<cms_index_index>
<reference name="customheader">
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
Then you need call this block by using getChildHtml(BlockNameATXmlCOde)
<?php echo $this->getChildHtml('product_homepage');?>
Please put this code at cms.xml or local.xml at app/design/frontend/YOUR_PAcakage/YOUR_TEMPLATE/layout/
If you using layout code then no need to cms block
Hi you need to change reference name custom header
<reference name="header"> <block type="page/header" name="customerheader"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block></reference>
Then accordingly you need to change most view block reference block name
<cms_index_index>
<reference name="customerheader"> <!-- here parentblock name which is define at above xml -->
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
According to discussion with you.you need to do this by using layout xml
Home handler: cms_index_index
is unique
for homepage.
Suppose
that the name of custom header
is customheader
then you can define the most_viewed by
<cms_index_index>
<reference name="customheader">
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
Then you need call this block by using getChildHtml(BlockNameATXmlCOde)
<?php echo $this->getChildHtml('product_homepage');?>
Please put this code at cms.xml or local.xml at app/design/frontend/YOUR_PAcakage/YOUR_TEMPLATE/layout/
If you using layout code then no need to cms block
Hi you need to change reference name custom header
<reference name="header"> <block type="page/header" name="customerheader"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block></reference>
Then accordingly you need to change most view block reference block name
<cms_index_index>
<reference name="customerheader"> <!-- here parentblock name which is define at above xml -->
<block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" />
</reference>
</cms_index_index>
edited Apr 10 '15 at 8:28
answered Apr 9 '15 at 18:38
Amit Bera♦Amit Bera
61.4k1683182
61.4k1683182
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
|
show 1 more comment
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
not working though
– Shoeb Mirza
Apr 9 '15 at 18:49
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
please tell me ?name of custom header at layout xml code ? Just block type="mostviewed/list" name="home.mostviewed.list" as="product_homepage" template="catalog/product/mostviewed.phtml" name is name="home.mostviewed.list" and aliase name is product_homepage
– Amit Bera♦
Apr 9 '15 at 18:51
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
Well I've simply put the <reference name="header"> <block type="page/header" name="header"> <action method="setTemplate"><template>cms/home.phtml</template></action> </block> in Home LAYOUT DESIGN </reference>
– Shoeb Mirza
Apr 9 '15 at 18:53
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
just change reference name="customheader" to reference name="header".Also i have using alias name in childblock call
– Amit Bera♦
Apr 9 '15 at 18:55
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
Well I do have changed that to header and posted and also I've called with alias name but still not working.
– Shoeb Mirza
Apr 9 '15 at 19:03
|
show 1 more comment
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f63221%2fhow-to-call-cms-block-of-block-type-into-custom-header%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
in which pages custom header has been called?
– Amit Bera♦
Apr 9 '15 at 18:14
Only on home page
– Shoeb Mirza
Apr 9 '15 at 18:17
where you call block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code at admin
– Amit Bera♦
Apr 9 '15 at 18:18
Already said above that I've called that under cms-block
– Shoeb Mirza
Apr 9 '15 at 18:21
Without block type="mostviewed/list" name="home.mostviewed.list" alias="product_homepage" template="catalog/product/mostviewed.phtml" code, Have you add any thing else in ] cms blocks
– Amit Bera♦
Apr 9 '15 at 18:24