Add AW Blog link to Magento top menu - magento

Using the Magento 1.4 blog plug-in "AW Blog", how is it possible to get the "News" link it creates to appear in Magento's top menu (as opposed to the top links menu which it does by default)?

After changing AW Blog 'Route to Blog' configuration from 'news' to 'blog', add this to top.phtml :
<div class="nav-container">
<ul id="nav">
<?php echo $_menu ?>
<li><?php echo $this->__('Blog') ?></li>
</ul>
Probably no the most elegant solution as I didn't want Blog at the end of the menu, so if there's a better solution out there...

I haven't tried it but this extension seems to allow adding an arbitrary link to the menu.
http://www.magentocommerce.com/extension/657/navigation-bar-administrator

Related

Is it possible to add a flag icon using the Magento admin panel?

Using magneto for my website and I need to display two different languagse. I have to set a flag icon for each location. One for English and one for Arabic. Is it possible to add a flag icon using the Magento admin panel, but not in root folder.
You can use extension https://www.magentocommerce.com/magento-connect/easy-flags-module.html
You can customize it in your way.
You should do it via template files.you will
have to write custom code for it.
Please refer to the example below:
<?php
foreach ($this->getCurrencies() as $_code => $_name):
$current_currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();
if($current_currency_code == $_code) continue;
?>
<li class=" sel-cur" data-toggle="tooltip" data-placement="bottom">
</li>
<?php endforeach; ?>
OR
You can Use extensions like
Easy Flags

Magento product overview and detail separated view

I want to handle the product overivew separataly to the product detail view. I want to add additional text right behind the price in the product deatil view.
I tried to edit the view.phtml in path app/design/frontend/mytheme/default/template/catalog/product/view.phtml, refreshed caches and so on, but nothing changed.
In catalog.xml view.phtml will be load. So its seems correct.
But even when I try to echo "test" it doesnt show anything.
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<div class="std"><h2><?php echo $this->__('Details:') ?></h2>
</div>
</div>
<?php echo "test";
endif;?>
Do you have any hint?
Regards
Matt
You should enable template path hints in the backend to check which template file is used to render product page. Make sure that the cache is also disabled.

In which file Joomla 3.x generating the "edit article" links for authors Front End?

If you are allowed to edit the articles in Joomla, near the each article in the list, an "edit" button is present. How can I find, how that "edit" button generated? I just want to add some parameters. (I'm using a Front End for edit.)
It's in components/com_content/views/article/tmpl/default.php
<?php if ($canEdit) : ?>
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
<?php endif; ?>
You can override this in your template's html folder.
This script calls a function under components/com_content/helpers/icon.php to generate the icon.
You should not override this helper file. If you need to change what that function is doing, filter the content it generates after it has been run, whether via a plug-in or the default.php file.

How to remove data from header menu and add new content to it in Magento

I am working with magento.
I have been trying to remove the content from header-menu and add fresh content like
**HOME ABOUTUS SITES CONTACT**
Here is the current situation,
Update
Above is the screen shot that follows after the top-menu
Please guide me to achieve this..
Thank you.
I assume the above menutimes that you've shown in the image are categories. So if you don't need it on the top menu then go to each of the categories (under Catalog -> Manage Categories) in the backend / admin panel and choose "NO" as an value to the option "Include in Navigation Menu". This will remove them from the navigation top menu.
And to bring these menu items
HOME ABOUTUS SITES
Let me describe it for one of the items above. Lets take About Us
At first create the respective CMS static block for "About Us"
Create a category called "About Us"
Go to display settings of the About Us category and choose the display mode as "static block only" and then select the static block "about us"
Save the category and reload your page on the frontend/website
you can find the "about us" category on the top menu and opening it will show the content from the static block.
Repeat the same for the other menu items.
If this helps mark it as answer. Thanks.
I think you didn't want categories in top menu. In place of it you want Custom links like "Home", "About us" etc.
For this open topmenu.phtml file in template->page->html.
In this commented the below line :-
<?php echo $_menu ?>
and in place of it call a static block of name "custom_top_nav" :-
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('custom_top_nav')->toHtml() ?>
In this block you can make your custom menu.
We you want both custom links plus categories then you can replace code with this:-
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<li class="home"> HOME </li>
<?php echo $_menu ?>
</ul>
</div>
<?php endif ?>
Magento hide categories in the header menu - This can be done from your Admin Panel under Manage Categories > To do this is easy if you don't want your categories in top menu of your web site - When you add a new Category Select no for > Include in Navigation Menu * Its under Meta Description at the bottom of the page where you add the the Category name in General Information Tab*

Magento 1.7: add active home button in menu

Im trying to add a home button in the navigation of my magento store. A lot has been written and I found this code that does the job.
<li class="home <?php echo !$_anyActive ? 'active' : '' ?>"><span><?php echo $this->__('Home') ?></span></li>
The only drawback is that it stays active while clicking on other categories. So it isn't behaving like the rest of the menu.
Any help?
Many thanks in advance!
Update:
Solved with the answer given below.
This should do the trick for you...
<li class="home <?php if (Mage::helper('core/url')->getCurrentUrl() === Mage::helper('core/url')->getHomeUrl()):?> active<?php endif;?>"><span><?php echo $this->__('Home') ?></span></li>
As you can see it checks to see if the url matches the home url. If so it then sets the class active.

Resources