# Related Items Question

**URL:** <https://forums.realmacsoftware.com/t/related-items-question/52523>\
**Category:** Elements\
**Created:** [November 17, 2025, 3:51pm UTC](https://forums.realmacsoftware.com/t/related-items-question/52523 "2025-11-17T15:51:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [November 17, 2025, 3:51pm UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/1 "2025-11-17T15:51:46Z")

</div>

After two sunny weeks of vacation in Tuscany, i’d like to implement related items and need some help.

Three pieces of information:

- I’m using the latest version of Elements
- I’m using Pretty URLs
- I’m using IIS, not Apache

#### This is my `web.config` (similar to the `.htaccess` file)

```auto
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>

                <!-- 0) Fallback: / oder /index.php ohne item= - Redirect -->
                <rule name="ohne item oder slug - redirect" stopProcessing="true">
                    <match url="^(|index\.php)$" ignoreCase="true" />
                    <conditions>
                        <!-- nur wenn KEIN item=… gesetzt ist -->
                        <add input="{QUERY_STRING}" pattern="(?:^|&amp;)item=" negate="true" />
                    </conditions>
                    <!-- Hier Ziel-URL eintragen -->
                    <action type="Redirect" url="/" redirectType="Permanent" />
                </rule>

                <!-- 1) index.php?item=slug → /slug (Rewrite) -->
                <rule name="?item=slug → slug" stopProcessing="true">
                    <match url=".*" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
                        <add input="{QUERY_STRING}" pattern="(?:^|&amp;)item=([^&amp;]+)" />
                    </conditions>
                    <action type="Rewrite" url="index.php?item={C:1}" />
                </rule>

                <!-- 2) /slug → index.php?item=slug -->
                <rule name="slug → index.php?item=slug" stopProcessing="true">
                    <match url="^([^/]+)/?$" ignoreCase="true" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?item={R:1}" appendQueryString="true" />
                </rule>

            </rules>
        </rewrite>
    </system.webServer>
</configuration>

```

#### This is my site structure:

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/2/0/20cf1807e69434da7e50824b5e8f9913345f2a56.png)

From the main page, all articles are correctly linked and displayed on the /articles/ page. Related items are displayed on each /articles/ page. I’ve specified the link using `{{ item.url }}`. However, it’s not being rendered/translated correctly:  
`https://www.cornrow.de/artikel/herr_grun_zieht_nach_lich/?item=unser_d-wurf_ist_da`

The correct link should be:  
`https://www.cornrow.de/artikel/unser_d-wurf_ist_da`

If i try the preview it works.

---

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [November 18, 2025, 3:02pm UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/2 "2025-11-18T15:02:05Z")

</div>

I think I’ve found the solution. Please don’t waste any more time thinking about it. I’ll post the solution once I’ve finished testing.

---

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [November 19, 2025, 9:17am UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/3 "2025-11-19T09:17:55Z")

</div>

@dan @ben _Related Item_ has a small problem with Pretty URL.

This only happen if the site is published because pretty url only work on webservers. This has nothing to do with IIS or apache.

#### without pretty url

The link to a post is `.../post/?item=article`  
The browser show `.../post/`  
Link to related item is `.../post/?item=relatedarticle`

#### with pretty url

The link to a post is `.../post/article`  
The browser show `.../post/article`  
Link to related item is `.../post/article/?item=relatedarticle`

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [November 20, 2025, 8:27am UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/4 "2025-11-20T08:27:17Z")

</div>

thanks for the report! Do you have a project I could test this on? 🙂

---

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [November 20, 2025, 8:56am UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/5 "2025-11-20T08:56:42Z")

</div>

[elementsapp://downloadDocument/4sIxDCToVhj0](elementsapp://downloadDocument/4sIxDCToVhj0)

This is _Appleseed Daily_ with `Related Items`

Published: [Jonny Appleseed's Blog](https://www.cornrow.de/appleseed)

---

<div class="post-metadata">

**Author:** ![Ulrich](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ulrich/32/29764_2.png) [@Ulrich](https://forums.realmacsoftware.com/u/Ulrich)\
**Post date:** [November 27, 2025, 7:59am UTC](https://forums.realmacsoftware.com/t/related-items-question/52523/6 "2025-11-27T07:59:18Z")

</div>

#### Fixed in Elements Version 1.5.4

thank you @ben

if anyone encounters problems, please clear browser cache
