HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


have side block appear only for one page

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#108179 (In Topic #21075)
Avatar

Fan in training

Hello,

I am sure this is possible and documented but I have yet to uncover the answer and it is difficult to find when searching as "block only visible in unique page" brings back wrong results.

Super appreciate any help on this, I am sure it's easy for you long time users...

How can I have a side block only appear when a certain page is being displayed?

thanks in advance

stevyn


-----------
Publisher of IronFeather Journal since 1987.
Host of KGNU Colorado Radio for 20 years.
Currently in Japan & decided to focus on ocPortal as my number one CMS.
Back to the top
 
Posted
Item has a rating of 5 (Liked by MrsWaffles)  
Rating:
#108180
Avatar

Hi,

You can use some Tempcode:

Code

{+START,IF,{$MATCH_KEY_MATCH,site:somepage,:somepage}}
(some Comcode)
{+END}

That targets it to only run on a page named 'somepage' in either the site zone or the welcome zone.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#108214
Avatar

Fan in action

Can someon tell me how to block right panel on profile page?
is it better to use grouping for block permissions?


Last edit: by MrsWaffles
Back to the top
 
Posted
Item has a rating of 5 (Liked by Chris GrahamLiked by MrsWaffles)  
Rating:
#108220
Avatar

Community saint

Surrounding the blocks in the right panel with some Tempcode should do the trick.

Code

{+START,IF,{$NEQ,{$PAGE},members}}
block code
{+END}

This also affects the actual Members page though, so instead you could use:-

Code


{+START,IF,{$NOT,{$MATCH_KEY_MATCH,site:members:view}}}
block code
[+END]

The actual members page will show both panels this way, but not the Profile page.
Back to the top
 
Posted
Item has a rating of 5 (Liked by KingBast)  
Rating:
#108232
Avatar

Fan in action


Emoticon  Thanks. I knew the code just not sure where to incorporate it and where to put the block code! Thanks for explaining a little more.. sometimes it helps a whole lot to ocPortal newbies.  
🅺🆁🆈🆂🆃🅰🅻 🅷🅰🅼🅸🅻🆃🅾🅽

Made with @SprezzKeyboard


-ҜRΨSTΔL HΔMILTΩΠ
Ceo/Founder http://casualspace.net

🅺🆁🆈🆂🆃🅰🅻 🅷🅰🅼🅸🅻🆃🅾🅽

Made with @SprezzKeyboard
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: