_edit query string parameters


(Steve Brown) #1

Hi,

 

Are there any query string parameters that you can add to  _edit to make it go into preview mode rather than edit mode?  I know you can set it up in the config file so that it opens preview by default but we only want to open in preview mode in certain circumstances - not every time.  Im thinking something like .../_edit?mode=preview

 

Thanks,

 

Steve.


(Anthony Barnes) #2

You can add this to the _edit url:

 

#mode=preview

 

For example:

 

http://matrixdemo.squiz.net/_edit#mode=preview


(Steve Brown) #3

Thanks Anthony, but that didnt seem to work.  It replaced my URL with http://www.lls.nsw.gov.au/_edit?SQ_ACTION=login& in the first instance and even when I was already logged in it still didnt work.

 

we are on v4.10.2

 

Steve.


(Anthony Barnes) #4

Hi Steve,

 

I'm not sure what's happening there, but it's possible you are on a version of EES prior to the addition of the hash parameters. You can try adding the query string value ?mode=preview instead of the hash, although you mentioned in your original post that you had already considered that one. EES should be listening to either one of those parameters, if it's not there may be something else happening that's preventing it from working (e.g. custom javascript interfering).

 

Can you check the javascript error console when you load the page?

 

Another option might be to give our support guys a call, it sounds like something that could be fairly quickly diagnosed.

 

Cheers,

Anthony


(Luke Wright) #5

Hi Steve,

 

The string you're looking for is "?asset_ei_screen=screenname" (ie. the name of the screen in lower-case), which is the standard usage for accessing a screen in Simple Edit mode.

 

Note, however that using this for preview mode only works in EES 1.5.0 [which requires a Matrix upgrade], and there is a small issue I can see when using this for the Contents and URLs screens (as their backend equivalents are called something different or provided through another asset), which I'll report shortly. The other screens are fine.

 

The hash method won't work, because the Login Design does not pass through hashes when it redirects after a login - only query strings. The hashes should work correctly once logged in.

 

Hope this helps a little.

 

Regards,

Luke