Remove UNI from design list in template switcher

First of all, the admin template should NOT BE DEPENDENT ON A SITE TEMPLATE!

As everyone knows, the admin runs off of the UNI template and thus the UNI template can not be removed from the site.  However, that does not mean we want people to be able to select the UNI template from the list of templates we have installed on our site.

Is there a way I can remove or hide the UNI template from the list of templates in the template switcher?

Geeks, making the world a better place
Quote · 10 May 2013

admin templates/settings chose the template you want as default and un tick the allow user to chose template option not sure if its possible from admin panel if you want user to change templates . I didn't read it properly you have more than one template to chose ...so do not know

 

Happy thoughts

Quote · 10 May 2013

No, we have several templates installed, we want users to be able to change templates, just don't want the UNI template to be one they can choose from.  I have already removed the ALT template but UNI is used by the admin page; so if you remove it, the admin page is screwed up.

Geeks, making the world a better place
Quote · 10 May 2013

Try this, not tested

Go to /templates/base/scripts/BxBaseMenu.php at line 131

After this

foreach($aTemplates as $sName => $sTitle) {

put this

if($sTitle == 'Uni')
     continue;

Give this a try and see.

so much to do....
Quote · 10 May 2013

Thanks for the help.  The file is BxDolMenuBottom.php and the template is UNI, all caps.  Worked like a charm.

Geeks, making the world a better place
Quote · 11 May 2013

Is there a modern day of doing this trick (removing the UNI template from the menu)`?  It seems that the files were changed.

Quote · 3 May 2019

Hello mrtn!

 

You may find the following lines in templates/base/scripts/BxBaseFunctions.php file:

foreach($aTemplates as $sName => $sTitle)

$aTmplVars[] = array (

 

and add between there th next code:

 

if ($sName == 'uni') continue;

Quote · 4 May 2019

Did not work out for me . I tried

 

a)

foreach($aTemplates as $sName => $sTitle)

$aTmplVars[] = array (

if ($sName == 'uni') continue;

and 

b)

foreach($aTemplates as $sName => $sTitle)

if ($sName == 'uni') continue;

$aTmplVars[] = array (

 

And i tried with uni and UNI both versions.

Did anyone have different results?

Quote · 4 May 2019

Provide me your Control Panel access, I'll check what's wrong

Quote · 8 May 2019

I also tried it Leonid, but also had no success. In fact I had the opposite. When I applied your changes, the only template accessible was UNI. The rest had vanished.

== is equal to, so I thought you were saying if the template was equal to UNI, display it. That's exactly what happened so I tried:

!=

!==

<>

with an identical result.

Quote · 8 May 2019

 

I also tried it Leonid, but also had no success. In fact I had the opposite. When I applied your changes, the only template accessible was UNI. The rest had vanished.

== is equal to, so I thought you were saying if the template was equal to UNI, display it. That's exactly what happened so I tried:

!=

!==

<>

with an identical result.

equate to is not the same as equal to.  It depends on what you are comparing. 

Geeks, making the world a better place
Quote · 8 May 2019

Hello everybody!

 

So the final part in the mentioned part should look like (it was necessary to add { } brackets):

foreach($aTemplates as $sName => $sTitle) {
			if ($sName == 'uni') continue;
			$aTmplVars[] = array (
				'bx_if:show_icon' => array (
				'condition' => false,
				'content' => array(),
				),
				'class' => $sName == $sCurrent ? 'sys-bm-sub-item-selected' : '',
				'link' => bx_html_attribute($_SERVER['PHP_SELF']) . '?' . $sGetTransfer . 'skin=' . $sName,
				'onclick' => '',
				'title' => $sTitle
			);
}
Quote · 15 May 2019

Great. Thanks Leonid.

Quote · 15 May 2019

Many thanks.

Quote · 15 May 2019
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.