Expand my Community achievements bar.

SOLVED

href link with column value

Avatar

Level 3

Hello eveyone

 

I’m working with selectors and tags and I need to load the next page while keeping the tag.

 

<li class="cmp-pressreleaselist__page_next">
            <a data-sly-unwrap="${list.isLastResultPage}"
               href="${currentPage.path @ selectors=[list.currentResultYear,list.currentResultCategory,list.nextResultPageNumber], extension='html', context='unsafe'}">
                ${'Next' @ i18n}
            </a>
        </li>

 

The issue is that is aem the namespaces where the tag is located is separated by column “:”, example “paris:louvre” but the href doesn’t accept columns “:”

example dref="content/core/adobe/home.2022.info:events.1.html

Does anyone know how can I make it work ?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @odabio ,

You have to encode the colon in order to use it in href attribute. Use encoded value %3A instead of colon and it will work as expected.

exampleto use href="content/core/adobe/home.2022.info%3Aevents.1.html

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Hi @odabio ,

You have to encode the colon in order to use it in href attribute. Use encoded value %3A instead of colon and it will work as expected.

exampleto use href="content/core/adobe/home.2022.info%3Aevents.1.html

Avatar

Community Advisor

Hi,

Can you try with

@ context='uri'

I suggest using Sling Model if there is a business logic included for URI or string manipulation.



Arun Patidar