Page 1 of 1

[SOLVED]whats purpose of import to database option for menu

Posted: Sun Nov 17, 2013 2:54 am
by userwords
In menu manager each menu template like simple navigation has an option on the right to import the template to the database. Whats the purpose, is it only so you can edit the template inside cmsms admin instead of doing it in an external editor.

Or does have something to do with speed load performance.

Or any other reason ::)

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 17, 2013 7:11 am
by staartmees
You can't edit those standard menutemplates. To do so, you have to import them in the database and give them another name.

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 17, 2013 8:56 am
by velden
Whats the purpose, is it only so you can edit the template inside cmsms admin instead of doing it in an external editor.
You should never edit the files that come with cmsms or its modules!
If you do, you can/will be unpleasantly surprised after an upgrade of cmsms...

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 17, 2013 3:54 pm
by userwords
I appreciate your replies.

No what i actually mean is what you say, although i make a copy of the tpl to edit in a editor then i would have reimported with the add a template button, leaving the core version of the template untouched.

Thats the reason i asked if the import to database had another reason to be there appart from editing a template and save it as another template.

As that can be done other way, i would think it was also some load speed optimization feature to make menu tpl load faster from database or reduce calls for the tpl or something.

Am i right to say then that import to database a menu template is only to rename, edit and save it as another one. And has nothing to do with load speed optimization in some way.

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 17, 2013 4:44 pm
by calguy1000
File base templates are usually faster than database based templates. But only for the first request.

After a template is compiled, the actual compiled form is cached in files anyways, and those are used until the template changes again.

So therefore, there is no justifiable performance gain in file based templates vs. database based templates.

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 17, 2013 11:16 pm
by chandra
velden wrote: You should never edit the files that come with cmsms or its modules!
If you do, you can/will be unpleasantly surprised after an upgrade of cmsms...
You can find a very nice technique for this situation here

http://calguy1000.com/Blogs/6/60.html

Re: whats the purpose of import to database option for menu

Posted: Sun Nov 24, 2013 9:48 pm
by userwords
I appreciate your posts, for me is crystal clear now, that it has nothing to do with what i said, and that it is not a performance oriented feature. :o