href link with column value | Community
Skip to main content
New Participant
April 12, 2022
Solved

href link with column value

  • April 12, 2022
  • 2 replies
  • 945 views

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.
Best answer by Anish-Sinha

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
April 13, 2022

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
Anish-Sinha
Anish-SinhaAccepted solution
Employee
April 13, 2022

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