Additional MLE question

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Additional MLE question

Post by christiaans »

While I am at it, I might as well pop another question;

Is it possible to remove the flags of the languages of which the current is NOT available?

So for instance; when I'm on the "About us" page in English (my default_lang), and that page is NOT available in say.. Spanish, I don't want the Spanish flag to show up. Is this in any way possible ?
Last edited by Anonymous on Thu Sep 04, 2008 9:33 am, edited 1 time in total.
alby

Re: Additional MLE question

Post by alby »

chris-s wrote: While I am at it, I might as well pop another question;

Is it possible to remove the flags of the languages of which the current is NOT available?

So for instance; when I'm on the "About us" page in English (my default_lang), and that page is NOT available in say.. Spanish, I don't want the Spanish flag to show up. Is this in any way possible ?
I don't like but works.
Maybe I think something ....

Alby
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: Additional MLE question

Post by christiaans »

Thanks, I'll try that out - when you think of a better solution, please let me know :).
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: Additional MLE question

Post by christiaans »

Okay, so I just tried this, but the problem is, whenever you edit the page, it inserts the "content_(yourlang)"  back in, in cms_content.prop_names. Since the pages are edited every now and then, this isn't good.

Is there a way to change this:

Code: Select all

               if(!in_array('content_'.$mle['block'],$contentobj->mProperties->mPropertyNames)){
		        break;
		}
Into something like: "if menutext_(lang) == empty, break"?

I hope you can help me out.
alby

Re: Additional MLE question

Post by alby »

chris-s wrote: Okay, so I just tried this, but the problem is, whenever you edit the page, it inserts the "content_(yourlang)"  back in, in cms_content.prop_names. Since the pages are edited every now and then, this isn't good.
Have you understand because I don't like this solution  ;) ?
Quick and dirty way it's check for one of this:
- content_$block in content_props table
- menu_text_$block in content table
- title_$block in content table

NaN has post a similar check in content_props table (for other param) here

Alby
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: Additional MLE question

Post by christiaans »

Haha yes, I totally understand now ;).

Thanks, I'll go and fiddle around with it for a little bit.
christiaans
Power Poster
Power Poster
Posts: 300
Joined: Tue Mar 04, 2008 10:37 am

Re: Additional MLE question

Post by christiaans »

alby wrote:
chris-s wrote: Okay, so I just tried this, but the problem is, whenever you edit the page, it inserts the "content_(yourlang)"  back in, in cms_content.prop_names. Since the pages are edited every now and then, this isn't good.
Have you understand because I don't like this solution  ;) ?
Quick and dirty way it's check for one of this:
- content_$block in content_props table
- menu_text_$block in content table
- title_$block in content table

NaN has post a similar check in content_props table (for other param) here

Alby
I tried the following:

Code: Select all

               if(!isset($contentobj->mProperties->mMenuText)){
		        break;
but now it doesn't any flag at all :(
Locked

Return to “[locked] CMSMS MLE fork”