Developer forum

Forum » CMS - Standard features » Language Management deactivate new pages

Language Management deactivate new pages

Rasmus Andersen
Reply

Hi DynamicWeb,

When using language management and checking the checkbox "Deactivate new pages", the pages on the language layers are not actually unpublished as I would have thought (and our customer would like), they are however set as "Hide in menu".

Is it possible to have pages on language layers unpublished instead of hidden in the menu?

Best regards
Rasmus


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Rasmus

Currently that is not possible.

Only option is to listen to Standard.Page.OnBeforeSave. In that notification you get a page object. If you test on page.IsNew and page.IsLanguage, you can set page.Hidden = True and the page should be unpublished after that.

BR Nicolai

Votes for this answer: 1
 
Rasmus Andersen
Reply

Hi Nicolai,

 Thanks, just wanted to make sure.
I guess my interpretation of deactivate was wrong :) 

Best regards,
Rasmus

 
Nicolai Pedersen
Reply

We have confusing naming in this area I am affraid. Page.Active = "Hide in navigation". Page.Hidden = Unpublished. Those 2 properties together is the tri-state that you can see in the UI.

So it works like this:

  • Page.Active=True & Page.Hidden=False = "PUBLISHED"
  • Page.Active=False & Page.Hidden=False = "HIDE IN MENU"
  • Page.Active=False & Page.Hidden=TRUE = "UNPUBLISHED"

That leaves one combination. Don't know what that will result in the UI.

Sorry about the confusion.

BR Nicolai

 
Rasmus Andersen
Reply

No problem.
I guess the ideal would have been an enum ;)

Best regards
Rasmus

 
Nicolai Pedersen
Reply

Yes! Bad design decision made a decade ago. Still haunting us because of compatibility...

 

You must be logged in to post in the forum