How do I add a template for account pages only?How do I add a customer logged in menu to a page from the local.xml fileHow can I know which .css file is used for a certain template?Adding template File in customer account pageTemplate/block only showing if customer logged in, not as default or guestDifferent template for different groupChange template for 2columns-left.phtml on Fishpig Wordpress pagesMagento 1.8.1 Shopper 'My Account' menu for mobile versionHow to hide a div on Checkout Page but show on other pages using header.phtml?How to use Customer Account menu on custom pageParent menu item unclickable after adding subcategory.
Why is "la Gestapo" feminine?
Is there a distance limit for minecart tracks?
How would a solely written language work mechanically
Do native speakers use "ultima" and "proxima" frequently in spoken English?
Started in 1987 vs. Starting in 1987
How to split IPA spelling into syllables
Reasons for having MCU pin-states default to pull-up/down out of reset
Why didn't Voldemort know what Grindelwald looked like?
Is divisi notation needed for brass or woodwind in an orchestra?
Can a Knock spell open the door to Mordenkainen's Magnificent Mansion?
What do the positive and negative (+/-) transmit and receive pins mean on Ethernet cables?
categorizing a variable turns it from insignificant to significant
Why is implicit conversion not ambiguous for non-primitive types?
Extract substring according to regexp with sed or grep
Why does the frost depth increase when the surface temperature warms up?
Can you describe someone as luxurious? As in someone who likes luxurious things?
Center page as a whole without centering each element individually
Output visual diagram of picture
What is the period/term used describe Giuseppe Arcimboldo's style of painting?
Why would five hundred and five same as one?
Would this string work as string?
Writing in a Christian voice
PTIJ: Which Dr. Seuss books should one obtain?
Does capillary rise violate hydrostatic paradox?
How do I add a template for account pages only?
How do I add a customer logged in menu to a page from the local.xml fileHow can I know which .css file is used for a certain template?Adding template File in customer account pageTemplate/block only showing if customer logged in, not as default or guestDifferent template for different groupChange template for 2columns-left.phtml on Fishpig Wordpress pagesMagento 1.8.1 Shopper 'My Account' menu for mobile versionHow to hide a div on Checkout Page but show on other pages using header.phtml?How to use Customer Account menu on custom pageParent menu item unclickable after adding subcategory.
I have a template that needs to be only on account pages and checkout pages.
I have got a menu in the local.xml that is shown when a customer is logged in but I want to show it only on certain pages aswell.
magento-1.7 template blocks menu
add a comment |
I have a template that needs to be only on account pages and checkout pages.
I have got a menu in the local.xml that is shown when a customer is logged in but I want to show it only on certain pages aswell.
magento-1.7 template blocks menu
add a comment |
I have a template that needs to be only on account pages and checkout pages.
I have got a menu in the local.xml that is shown when a customer is logged in but I want to show it only on certain pages aswell.
magento-1.7 template blocks menu
I have a template that needs to be only on account pages and checkout pages.
I have got a menu in the local.xml that is shown when a customer is logged in but I want to show it only on certain pages aswell.
magento-1.7 template blocks menu
magento-1.7 template blocks menu
edited 8 mins ago
Teja Bhagavan Kollepara
3,00641949
3,00641949
asked Sep 13 '13 at 13:41
M dunbavanM dunbavan
179139
179139
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can target specific pages by using their respective handles.
Add the following to your local.xml
<checkout_cart_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_onepage_index>
<customer_account>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</customer_account>
<customer_logged_out>
<remove name="custom_menu"/>
</customer_logged_out>
Guessing the menu would be added in the header
of your webshop this will add it to the cart, checkout and customer account section ONLY for logged in users.
I've used the customer_logged_out
handle to remove the menu when a user is not logged in. Somewhat along the lines of what you've discribed in your question.
Now you can call the menu by adding the following code in your header.phtml
where you want to display the menu.
<?php echo $this->getChildHtml('custom_menu');?>
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file hasecho $this->getChildHtml()
without a key in it.
– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
|
show 4 more comments
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%2f7958%2fhow-do-i-add-a-template-for-account-pages-only%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
You can target specific pages by using their respective handles.
Add the following to your local.xml
<checkout_cart_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_onepage_index>
<customer_account>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</customer_account>
<customer_logged_out>
<remove name="custom_menu"/>
</customer_logged_out>
Guessing the menu would be added in the header
of your webshop this will add it to the cart, checkout and customer account section ONLY for logged in users.
I've used the customer_logged_out
handle to remove the menu when a user is not logged in. Somewhat along the lines of what you've discribed in your question.
Now you can call the menu by adding the following code in your header.phtml
where you want to display the menu.
<?php echo $this->getChildHtml('custom_menu');?>
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file hasecho $this->getChildHtml()
without a key in it.
– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
|
show 4 more comments
You can target specific pages by using their respective handles.
Add the following to your local.xml
<checkout_cart_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_onepage_index>
<customer_account>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</customer_account>
<customer_logged_out>
<remove name="custom_menu"/>
</customer_logged_out>
Guessing the menu would be added in the header
of your webshop this will add it to the cart, checkout and customer account section ONLY for logged in users.
I've used the customer_logged_out
handle to remove the menu when a user is not logged in. Somewhat along the lines of what you've discribed in your question.
Now you can call the menu by adding the following code in your header.phtml
where you want to display the menu.
<?php echo $this->getChildHtml('custom_menu');?>
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file hasecho $this->getChildHtml()
without a key in it.
– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
|
show 4 more comments
You can target specific pages by using their respective handles.
Add the following to your local.xml
<checkout_cart_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_onepage_index>
<customer_account>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</customer_account>
<customer_logged_out>
<remove name="custom_menu"/>
</customer_logged_out>
Guessing the menu would be added in the header
of your webshop this will add it to the cart, checkout and customer account section ONLY for logged in users.
I've used the customer_logged_out
handle to remove the menu when a user is not logged in. Somewhat along the lines of what you've discribed in your question.
Now you can call the menu by adding the following code in your header.phtml
where you want to display the menu.
<?php echo $this->getChildHtml('custom_menu');?>
You can target specific pages by using their respective handles.
Add the following to your local.xml
<checkout_cart_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_cart_index>
<checkout_onepage_index>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</checkout_onepage_index>
<customer_account>
<reference name="header">
<block type="menu/block" name="custom_menu" template="custommenu/template.phtml"/>
</reference>
</customer_account>
<customer_logged_out>
<remove name="custom_menu"/>
</customer_logged_out>
Guessing the menu would be added in the header
of your webshop this will add it to the cart, checkout and customer account section ONLY for logged in users.
I've used the customer_logged_out
handle to remove the menu when a user is not logged in. Somewhat along the lines of what you've discribed in your question.
Now you can call the menu by adding the following code in your header.phtml
where you want to display the menu.
<?php echo $this->getChildHtml('custom_menu');?>
edited Sep 13 '13 at 14:01
answered Sep 13 '13 at 13:48
Sander Mangel♦Sander Mangel
34.9k570137
34.9k570137
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file hasecho $this->getChildHtml()
without a key in it.
– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
|
show 4 more comments
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file hasecho $this->getChildHtml()
without a key in it.
– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
1
1
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Does this go into local.xml?
– M dunbavan
Sep 13 '13 at 13:53
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Yes it does, should have mentioned this :)
– Sander Mangel♦
Sep 13 '13 at 13:54
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
Will this automatically show in the header or will I need to call <?php echo $this->getChildHtml('my_account_menu_block') ?>?
– M dunbavan
Sep 13 '13 at 13:55
You will need to call it. It will only be automatically added of a PHTML file has
echo $this->getChildHtml()
without a key in it.– Sander Mangel♦
Sep 13 '13 at 13:57
You will need to call it. It will only be automatically added of a PHTML file has
echo $this->getChildHtml()
without a key in it.– Sander Mangel♦
Sep 13 '13 at 13:57
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
So adding <?php echo $this->getChildHtml('my_account_menu_block') ?> into my header will call the block but only on account pages and checkout pages?
– M dunbavan
Sep 13 '13 at 13:59
|
show 4 more comments
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%2f7958%2fhow-do-i-add-a-template-for-account-pages-only%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