eZ Community » Forums » Developer » How to get current siteaccess name on...
expandshrink

How to get current siteaccess name on extension load

How to get current siteaccess name on extension load

Monday 16 May 2016 11:01:57 am - 2 replies

Hi,

 

We've multi-site setup, hence many siteaccess. I would like to load different config based on current siteaccess in this method: http://symfony.com/doc/current/co...extension.html#using-the-load-method

But I'm unable to access ezpublish.siteaccess from load() method. Also created a service and injected epublish.siteaccess to that service and then call a particular method(getSiteaccessName()) to get the siteaccess name. But It shows "The service definition "ezpublish.siteaccess" does not exist."

Would you please anyone help me out on this?

 

Best Regards,

Rashidul

Modified on Monday 16 May 2016 11:03:36 am by Rashidul Islam Rana

Thursday 03 November 2016 9:12:47 am

I think you can't load different settings per siteaccess, because at the end one symfony app call loads one big config.yml.

We have made a multisite setup @see https://github.com/cjw-network/cjwpublish1411 where you can have several apps / site bundles in one ez installation.

So you can separate the Sites.

May be this will help you a little bit.

Sunday 13 August 2017 5:07:58 pm

This is what we do:

Create different bundle for different siteaccess and load the config as you linked above.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from