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

Se poate adauga atributul “title” in tagul <a> al categoriilor ? 
 
Alecs00
Member
 
Total Posts:  73
Joined:  2011-05-03
 

Salut ,
Ma intreb daca se poate adauga atributul “title” in tagul <a> al categoriilor, din meniul vertical;
Folosesc \”Sidebar Navigation Menu Professional\”

Mi-ar trebui ceva de genu:  title=\"<?php echo $cat->getName();?>\” dar unde pot adauga codul asta!

Navigation.phtml:

<?php if ($categories $this->getCategoriesNavMenu()): ?>
<div id=\"sidebar-nav\" class=\"sidebar-nav-left\">
    <
div class=\"block-title\">
        <
strong><span><?php echo Mage::helper(\'sidenav\')->__($this->getTitle()) ?></span></strong
    </
div>
    <
div class=\"block-content\">
        <
ul id=\"sidebar-nav-menu\">
        
<?php echo $categories?>
        
</ul
    </
div>
</
div>
<?php endif ?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
tzyganu
Mentor
 
Avatar
Total Posts:  2205
Joined:  2009-11-18
Bucharest, Romania
 

Salut
Presupun ca metoda ‘getCategoriesNavMenu’ “deseneaza” categoriile sub forma de lista.
Cred ca ar trebui sa modifici functia respectiva si sa adaugi si title pe tagul a.
Daca nu gasesti posteaza corpul functiei aici si ma uit.

Marius.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Alecs00
Member
 
Total Posts:  73
Joined:  2011-05-03
 

Salut Marius, si ms de raspuns, sincer pe tine te asteptam smile

Cred ca m-am descurcat, am gasit in /public_html/app/code/community/Codnitive/Sidenav/Block/Navigation.php functia.
si am modificat urmatoare linie de cod :

$html[] '<a href="' $this->getCategoryUrl($category) . '" title="' $this->escapeHtml($category->getName()) .'"   ' 
            
$linkClass.'><span class="category_name">' 
            
$this->escapeHtml($category->getName()) . '</span></a>';

unde am adaugat “

title="' '"

sper sa fie si ok, nu sunt prea sigur cum e cu apostrof “ si ‘ (ideea e ca merge)

oricum ms mult
Alex.

 
Magento Community Magento Community
Magento Community
Magento Community
 
olicristea
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2012-06-21
Pitest, Romania
 

Va multumesc mult pentru acest post si raspuns, ma chinui de o luna sa gasesc aceasta solutie, seara buna sa aveti!

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