# How to create a dynamic link that shows a view filtered by current entity?

**URL:** <https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152>\
**Category:** Get Help\
**Created:** [September 14, 2023, 3:03pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152 "2023-09-14T15:03:39Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [September 20, 2023, 5:50pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/21 "2023-09-20T17:50:37Z")

</div>

> [@Chr1sG](#):
>
> So you expect to have a url which, when copy-pasted from one entity to another, will automatically update itself to point to a different view (so it is not context filtered based on the first entity but on the second)?  
> I am not aware of any tool that supports such a concept. Have you encountered it before somewhere else?

Drupal has dynamic contextual filtering of views out of the box with the Views module.

1. **[Views Module](https://www.drupal.org/project/views)**: Can present data in diverse formats, from lists to slideshows. Its strong feature is the ability to use contextual filters. So the exact same single link when placed in different entities, can display varied content based on the context of the entity it’s in. For example, [www.example.com/team-members](http://www.example.com/team-members) when placed in different Project entities rich text field, would show a different listing in each Project entity.

**Some other modules that have other approaches:**  
2. **[Token Module](https://www.drupal.org/project/token)**: Provides dynamic data placeholders for content. In Fibery, a token system could create dynamic links in rich text fields that are contextually aware, making links adaptable and context-sensitive.  
3. **[Paragraphs Module](https://www.drupal.org/project/paragraphs)**: Offers flexible and modular content structures. In Fibery, this could address concerns about restrictive static layouts, allowing for more dynamic content structuring.  
4. **[Display Suite Module](https://www.drupal.org/project/ds)**: Allows for varied display configurations of the same content type or entity. In Fibery, this could provide multiple display options for entities, enhancing content presentation flexibility.

---

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [September 20, 2023, 5:51pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/22 "2023-09-20T17:51:24Z")

</div>

> [@Yuri\_BC](#):
>
> Copy pasting the smart folder view’s URL gives a link to the result below.  
> The Smart folder view link buttons in the left navigation column work obviously, but pasting the link apparently leaves out information that the smart forlder view link appends when opening in a new panel. Or did I misunderstand it?

Can you confirm this?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 22, 2023, 6:28am UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/23 "2023-09-22T06:28:37Z")

</div>

We’re looking into this, it may be a bug

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 26, 2023, 9:35am UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/24 "2023-09-26T09:35:47Z")

</div>

Should be fixed now

---

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [September 26, 2023, 8:08pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/25 "2023-09-26T20:08:31Z")

</div>

Not yet. Still the same behavior: copy pasting the smart folder view’s URL does not give the view, but still the entity select box.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 26, 2023, 8:36pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/26 "2023-09-26T20:36:33Z")

</div>

Sorry. I misspoke. The bug is fixed in our staging environment, so is likely to make it to production later this week.

---

<div class="post-metadata">

**Author:** ![hansonreas](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/hansonreas/32/7674_2.png) [@hansonreas](https://community.fibery.io/u/hansonreas)\
**Post date:** [September 26, 2023, 10:21pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/27 "2023-09-26T22:21:41Z")

</div>

Hello, I’m sure the effect he wants to achieve is exactly what I want to achieve. You put forward the use \<\< to add embed view One-off in the article.But what we want is to add this view automatically when we create a new entity division every time. But because we can’t find the corresponding expression or number in the trigger to refer to this view.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 27, 2023, 5:47am UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/28 "2023-09-27T05:47:03Z")

</div>

As I mentioned before, it’s not possible to create a view simply by constructing a URL to refer to it.

> [@hansonreas](#):
>
> what we want is to add this view automatically when we create a new entity division every time. But because we can’t find the corresponding expression or number in the trigger to refer to this view.

See my earlier answer

> [@Chr1sG](#):
>
> You could find a given (smart folder) view’s id and then use an automation, to populate the rich text field with a link to this view, context filtered based on the current entity’s public ID.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 28, 2023, 10:48am UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/29 "2023-09-28T10:48:23Z")

</div>

Fix released to production [today](https://community.fibery.io/t/sep-28-2023-20-fixed-bugs-and-some-improvements/5213):  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/c/ce2f57521daa4556e01e9bcf545066d484b1b7fa.png)

---

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [September 28, 2023, 12:41pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/30 "2023-09-28T12:41:07Z")

</div>

We’re getting closer…the pasted link works 🥳, but when I use the ‘_Convert Link to Mention_’ feature, the resulting link does not work 🥲.

For example, before _Covert Link to Mention_, the link URL is:  
`https://cce.fibery.io/Yuri_Space/Y_Hub/Sociocracy-3.0-(S3)-1/Hub-Pages-2655`

After _Convert Link to Mention_, the link button URL is:  
`https://cce.fibery.io/Yuri_Space/Hub-Pages-2655`

So the _Convert Link to Mention_ feature strips information from the link URL.

By the way, there are other issues related to the _Convert Link to Mention_ feature in which it strips parts of the URL, such as:

> [@'Convert link to mention' overwrites the Header link title and anchor link](https://community.fibery.io/t/convert-link-to-mention-overwrites-the-header-link-title-and-anchor-link/4597):
>
> When clicking the ‘copy link to clipboard’ icon next to a header in rich text Paste it somewhere (e.g. at the top of the rich text field to create a custom TOC) Hover the link and click ‘Mention’ in the link menu. The link and title of the link are converted to the entity title and link. This is unexpected behavior. Desired behavior: The created Mention link to show the header text and keep the header link.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 28, 2023, 1:02pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/31 "2023-09-28T13:02:21Z")

</div>

Based on the earlier comments in the thread, I had assumed that you would be generating these links automatically (i.e. via a markdown template) in which case you can just do something like the following:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/b/b7e06d19d05aeb6ea74148eb6b6bb196e852c4b9.png)

If you just want to paste the link, don’t convert it to a mention 😜

But seriously, I don’t know if there is a technical obstacle to mentions pointing to context views - I will check.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [September 28, 2023, 1:21pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/32 "2023-09-28T13:21:34Z")

</div>

I couldn’t reproduce what you’re describing:

![firefox_LTpHhzyKhY](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/d/d968731f094568e96847b75501810ac1759a12e0.gif)

Do you want to show what’s happening for you.

---

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [September 30, 2023, 2:36pm UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/33 "2023-09-30T14:36:57Z")

</div>

> [@Chr1sG](#):
>
> Do you want to show what’s happening for you.

![](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/5ffa4b4208e6705e5be534dd2a14f9426939a918.gif)

---

<div class="post-metadata">

**Author:** ![Minh\_Tri\_Do\_Hang](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/minh_tri_do_hang/32/6791_2.png) [@Minh\_Tri\_Do\_Hang](https://community.fibery.io/u/Minh_Tri_Do_Hang)\
**Post date:** [October 8, 2023, 7:57am UTC](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152/34 "2023-10-08T07:57:19Z")

</div>

What if I got 1 Url field, then I use this syntax, can it be created iframe in rich text ?

> [Open link](Url field}

Also I’ve already asked for template for each daily entity, which mean sometimes I really wanna to pinned some views, or some databases in some period entities or recurring entities. Get IDs 's not optimal option right now

[Previous page](https://community.fibery.io/t/how-to-create-a-dynamic-link-that-shows-a-view-filtered-by-current-entity/5152.md?page=1)
