2

I'm using Porto theme (documentation: porto doc) and i want to change to topLinks:

enter image description here

The problem is that i can't find the static block that contains those links. Or are those links inside a .phtml file? :-s

Thank you!

  • you can find above header links in custmer.xml file where you can remove or change the links. – Rv Singh Nov 13 '18 at 9:13
3

Go to Admin > Port > Porto - Settings Panel > Header Type you find your selected header type.

In that selected type Header 3 for exemple you'll find : <?php echo $this->getChildHtml('topLinks'); ?>, this topLinks refers to customer.xml and that links are added via xml something like this:

<default>
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
    </reference>
</default>

To find the path's you have to enable the path hints like this.

| improve this answer | |
  • hey @PRINCE, i don't have a customer.xml in my layout folder :( – emma Nov 13 '18 at 10:44
  • You copy it from app/design/frontend/base/default/layout/customer.xml to app/design/frontend/smartwave/{themename}/layout/customer.xml then update this last one – PЯINCƏ Nov 13 '18 at 11:18
  • 1
    thank you thank you thank you thank youuuuuuuu! :D it works <3 – emma Nov 13 '18 at 11:34
  • Lol :) you're welcome, Good luck ! – PЯINCƏ Nov 13 '18 at 12:33
1

Generally, the top links do not come from PHTML files or static blocks.

These links appear from the layout XML files of the theme.

Below is the default place where you can find these links:

  • My Account: app/design/frontend/{your-theme-package}/{your-theme}/layout/customer.xml
  • Log In: app/design/frontend/{your-theme-package}/{your-theme}/layout/customer.xml
  • My Wishlist: app/design/frontend/{your-theme-package}/{your-theme}/layout/wishlist.xml

You can find code like below:

<reference name="top.links">
...
...
</reference>

Update: Remove Log In link from the top links:

<customer_logged_out>
        ...
        ...
        ...
        <reference name="top.links">
            <action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
        </reference>
        <remove name="reorder"></remove>
    </customer_logged_out>

Find the code like above and either comment out or remove it from the app/design/frontend/{your-theme-package}/{your-theme}/layout/customer.xml file.

| improve this answer | |
  • hey, thank you for taking time off to help me but how do i choose to eliminate "Log In" for example? :-? I want to have only My Account and My Wishlist there :( – emma Nov 13 '18 at 9:48
  • @emma, please check my updated answer. – Mohit Kumar Arora Nov 13 '18 at 9:53
  • hey, i don't have a customer.xml file in there :( – emma Nov 13 '18 at 10:32
  • then there should a local.xml file, where you can find such code. – Mohit Kumar Arora Nov 13 '18 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.