href link with column value | Community
Skip to main content
Level 2
Apr 12, 2022 4:04 PM UTC
Solved

href link with column value

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Anish-Sinha
Anish-SinhaAccepted solution
Employee
Apr 13, 2022 2:49 AM UTC

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

2 replies

arunpatidar
New Participant
Apr 13, 2022 8:07 AM UTC

Hi,

Can you try with

@ context='uri'

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

Translate
Arun Patidar
Anish-Sinha
Anish-SinhaAccepted solution
Employee
Apr 13, 2022 2:49 AM UTC

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

Translate