Forum Discussion

tonongregory's avatar
10 years ago

Articles component get article id

Hello

I override articles component (articles@override).

 

I want to add a <div> for each articles, my code is

 

<@delegate />

<div id=""><div>

 

But i want to get current article id to identify my div like

<@delegate />

<div id="${article.id}"><div>

 

How can i get this id ?

2 Replies

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    10 years ago

    Hi,

     

    have you tried the env context object ? Although I believe "articles" loads a list of messages rather than a single message so I am not sure you will get a single message's context there.

     

    Thanks,

  • This cannot be done until you get the custom component added at the grid level. The OOTB component renders a list so getting an ID for each article is not possible. You need to contact Support for this.