Jump to content

Pages, multiple check

Featured Replies

Posted

Hello guys

I'm really bad with codes, and I've been searching but I get nothing yet.

I'm trying to add content in different pages (Pages APP) through globalTemplate.
Something like this:

{{if \IPS\cms\Pages\Page->id == 1, 2, 3}}
content
{{endif}}

How could I implement this? ?
Appreciate any help.

Cheers!

Just now, Heosforo said:

Hello guys

I'm really bad with codes, and I've been searching but I get nothing yet.

I'm trying to add content in different pages (Pages APP) through globalTemplate.
Something like this:


{{if \IPS\cms\Pages\Page->id == 1, 2, 3}}
content
{{endif}}

How could I implement this? ?
Appreciate any help.

Cheers!

{{if in_array(\IPS\cms\Pages\Page::$currentPage->id, array(1,2,3)) }}
content
{{endif}}

 

  • Author

Thanks mate! ?

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.