Jump to content
View in the app

A better way to browse. Learn more.

Learn more

How to display block based on page in pages record

Featured Replies

I have handful of database record blocks that I want to display (records template) depending on the topic you're on but Help Guides (had examples to do this) no longer visible.

{{if \IPS\Request::i()->url}}

  • Author
{{if strpos( \IPS\Request::i()->path, '/hero/feria-shen-r16' ) !== FALSE}}
	Feria Shen
{{elseif strpos( \IPS\Request::i()->path, 'hero/justina-gu-r14/' ) !== FALSE}}
	Justina Gu
{{endif}}

Is there a way to target a specific record in pages? I could target the page itself but I need to go one step further that only viewable per record.

  • Author

I finally figured out why the elseif isn't working when you're going into the record. At the end of the path, make sure you're not using " / " like I have in my example.

On 6/8/2026 at 10:04 PM, Goza said:

Damn. I wish I knew of that six months ago - I had to hunt around for for a JS solution to achieve what's exampled in your archive link. And the JS I installed is clunky / a bit slow. I'd change over to what's in the archived page, but I am probably soon making changes again which will remove the need for this. Having said this, why is good, useful information like this removed by Invision? I can see I might have use for that again in the future.

Thank you for posting your solution.

Recently Browsing 0

  • No registered users viewing this page.

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.