Jump to content
Sign in to follow this  
Zeka

Add Field::flagAutojoin to some fields only for specific template/pages

Recommended Posts

Hi.
For now I add flag at init.php and remove it in ready.php like


// init.php
if (strpos(sanitizer()->entities(input()->url()), 'some/page/')) {
	fields('somefield')->addFlag(Field::flagAutojoin);
}

// ready.php
fields('somefield')->removeFlag(Field::flagAutojoin);

But there are pages that not so easy to identify by URL.

So far I couldn't find any suitable hook and probably it is the only way to do it, or I missed something? 

Thank!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...