CERN Accelerating science

How to rewrite the More link in FAQ List to another URL

Dear support,

I have the following FAQ List view: https://beams.web.cern.ch/newsletters which is showing entries coming from CDS via this feed: https://beams.web.cern.ch/admin/structure/feeds/manage/newsletter?destination=/admin/structure/feeds.

How can I rewrite the More link to link to the CDS entry instead of the Drupal node?

Kind regards,
Katarina

Hello Katarina,

I am not 100% sure about the structure, but after having a quick look I understand the following:

  • You have an RSS feed that imports newsletters
  • You have a content type called Newsletter which imports the newsletters from the feed. One of the fields imported is the CDS link. I guess the content type field that holds the CDS link is the field_listing_cds, right?
  • If yes, then all you have to do is what the following GIFs shows (+ remove the Link from the body of the accordion):

Let me know if it solves your question.

Konstantinos

Hi Konstantinos,

Your understanding is mostly correct, however I don’t understand what you mean that "the content type field that holds the CDS link is the field_listing_cds". I have created a mapping as in the image attached, how do I do what you suggest to map the CDS link to this field?

Cheers,
Katarina

Hello again Katarina,

I had a closer look and now its more clear. So here is the deal:

  • The CDS link of the newsletter is already imported in a field called Link. However as you can see in the screenshot below, the link is already imported and has as text the name of the newsletter.

  • Now in order to show the CDS Link inside the Accordion, you need to move the Link field under the Body pattern field.

  • In this case though you will notice that there are two links: (1) The More Link and (2) the actual CDS link.

    The More Link comes from the Body field that is trimmed and displays a “More” link after trimming. You can find how to remove the More Link in the following GIF

  • The text of the CDS link is imported directly from the feed. If you want to change this text let me know in order to find a solution because currently the feed items are not editable.

Let me know if it answers your question

Konstantinos

Hi Konstantinos,

This is the solution I got as well, which is an okay solution. A nicer solution would be to be able to use the URL imported from the CDS entry for the “More” link. If it is not possible, I will use the solution you describe above.

Cheers,
Katarina