Page 1 of 1

Sitemap Page ( Disable links)

Posted: Wed May 22, 2019 3:01 pm
by steezy
Hello Experts,
How to edit Sitemap Page to hide or remove links highlighted on my attached image. Any help would be highly appreciated.

Thank you in advance!!!

Re: Sitemap Page ( Disable links)

Posted: Thu May 23, 2019 6:36 pm
by paulfeakins
letxobnav wrote:
Thu May 23, 2019 12:43 am
Those are normally 302 redirect pages and those are not indexed anyway.
On the other hand, they also add no value whatsoever.
Then again, what is the value of a sitemap page anyway other than nostalgia of earlier internet days?
My questions exactly - why do this?

Re: Sitemap Page ( Disable links)

Posted: Fri May 24, 2019 4:55 am
by Qphoria
It is not the helper's place to ask "why". Just give the answer.

EDIT: catalog/view/theme/default/template/information/sitemap.twig
FIND:

Code: Select all

<div class="col-sm-6">
          <ul>
            <li><a href="{{ special }}">{{ text_special }}</a></li>
            <li><a href="{{ account }}">{{ text_account }}</a>
              <ul>
                <li><a href="{{ edit }}">{{ text_edit }}</a></li>
                <li><a href="{{ password }}">{{ text_password }}</a></li>
                <li><a href="{{ address }}">{{ text_address }}</a></li>
                <li><a href="{{ history }}">{{ text_history }}</a></li>
                <li><a href="{{ download }}">{{ text_download }}</a></li>
              </ul>
            </li>
            <li><a href="{{ history }}">{{ text_cart }}</a></li>
            <li><a href="{{ checkout }}">{{ text_checkout }}</a></li>
            <li><a href="{{ search }}">{{ text_search }}</a></li>
            <li>{{ text_information }}
              <ul>
                {% for information in informations %}
                <li><a href="{{ information.href }}">{{ information.title }}</a></li>
                {% endfor %}
                <li><a href="{{ contact }}">{{ text_contact }}</a></li>
              </ul>
            </li>
          </ul>
        </div>
Remove all surrounding
<a href="{{ xxxxx }}"> and </a> tags around each of those list items.

Re: Sitemap Page ( Disable links)

Posted: Fri May 24, 2019 9:07 am
by letxobnav
that is the wrong answer as it would also remove all information links which is not what was asked for.

if you want the easy route i.e. not disable the construction of the links then simply comment those sections out:

you change:

Code: Select all

        <div class="col-sm-6">
          <ul>
            <li><a href="{{ special }}">{{ text_special }}</a></li>
            <li><a href="{{ account }}">{{ text_account }}</a>
              <ul>
                <li><a href="{{ edit }}">{{ text_edit }}</a></li>
                <li><a href="{{ password }}">{{ text_password }}</a></li>
                <li><a href="{{ address }}">{{ text_address }}</a></li>
                <li><a href="{{ history }}">{{ text_history }}</a></li>
                <li><a href="{{ download }}">{{ text_download }}</a></li>
              </ul>
            </li>
            <li><a href="{{ history }}">{{ text_cart }}</a></li>
            <li><a href="{{ checkout }}">{{ text_checkout }}</a></li>
            <li><a href="{{ search }}">{{ text_search }}</a></li>
            <li>{{ text_information }}
              <ul>
                {% for information in informations %}
                <li><a href="{{ information.href }}">{{ information.title }}</a></li>
                {% endfor %}
                <li><a href="{{ contact }}">{{ text_contact }}</a></li>
              </ul>
            </li>
          </ul>
        </div>
with:

Code: Select all

        <div class="col-sm-6">
          <ul>
            {#
            <li><a href="{{ special }}">{{ text_special }}</a></li>
            <li><a href="{{ account }}">{{ text_account }}</a>
              <ul>
                <li><a href="{{ edit }}">{{ text_edit }}</a></li>
                <li><a href="{{ password }}">{{ text_password }}</a></li>
                <li><a href="{{ address }}">{{ text_address }}</a></li>
                <li><a href="{{ history }}">{{ text_history }}</a></li>
                <li><a href="{{ download }}">{{ text_download }}</a></li>
              </ul>
            </li>
            <li><a href="{{ history }}">{{ text_cart }}</a></li>
            <li><a href="{{ checkout }}">{{ text_checkout }}</a></li>
            <li><a href="{{ search }}">{{ text_search }}</a></li>
            #}
            <li>{{ text_information }}
              <ul>
                {% for information in informations %}
                <li><a href="{{ information.href }}">{{ information.title }}</a></li>
                {% endfor %}
                <li><a href="{{ contact }}">{{ text_contact }}</a></li>
              </ul>
            </li>
          </ul>
        </div>
and clear your theme cache.

Re: Sitemap Page ( Disable links)

Posted: Fri May 24, 2019 4:20 pm
by paulfeakins
Qphoria wrote:
Fri May 24, 2019 4:55 am
It is not the helper's place to ask "why". Just give the answer.
Often getting to the root of the "why" can allow you to come up with a better or different solution or even advise them it's not necessary.

E.g.
Client: "I want you to change my sitemap"
Supplier: "Why?"
Client: "Because I read this article that says it's better for SEO"
Supplier: "That doesn't actually apply since the most recent update so it's not necessary - save the time and money"

Re: Sitemap Page ( Disable links)

Posted: Sat May 25, 2019 1:07 pm
by steezy
first of all thanks to everyone for noticing my concern, extremely appreciated!!!
@Qphoria, @letxobnav, I tried both of your suggestions but nothing seems to happen, by the way my concern is to remove those links not disable them.

@paulfeakins
I want to look my website as pure catalog, and I think I would not be needing those details.

Re: Sitemap Page ( Disable links)

Posted: Sat May 25, 2019 6:09 pm
by letxobnav
told you to clear your theme cache

Re: Sitemap Page ( Disable links)

Posted: Mon May 27, 2019 7:47 am
by steezy
letxobnav wrote:
Sat May 25, 2019 6:09 pm
told you to clear your theme cache
Yes , I did clear my theme cache...

EDIT:
Did not figured out earlier that I am editing different twig file, cause I'm using custom theme. Edited the sitemap.twig file on my custom theme directory and now it is done accordingly. Thank you very much!!!