Home / Topic / external code or page elements

external code or page elements

Home Kwiksher Forums Tutorial Suggestions external code or page elements

Viewing 8 posts - 1 through 8 (of 8 total)
  • eyndrea
    Participant
    #10029

    First of all, I don't know if it's possible to make…In one app that I made I have one superior menu that it is the same in 45 pages. Also I have one draggable menu that is the same in the same 45 pages.In other pages I have other superior menu for 10 pages....All of this in 4 languajes.I think it will be interesting to know if it's possible to add this with external code, library or somethingI think it is a problem that the same code, layers and images have to be in all the pages. I don't know if it is possible to make the code for the superior menu in one page and after save it to use it in diffefent pages like external code, library...¿?If we have to copy and modify some code I think we can learn it.It would be a good help to have a tutorial to can use the same elements in different pages and don't have to have a lot o pages with the same images, layers, code, variables...Perhaps this can reduze the render time alsoIn this case I don't know if it would be good for that projects who need a lot of variables (in corona you can not use more than 200 variables)I say this because in one page with a lot of layers, differents languajes, a lot of buttons.... is possible to get more than 200 variables.

    Anonymous
    #14456

    In order to do what you are asking you will need to codify your menu and add it in the main.lua file (2.3 beta already allow you to do that). Unfortunately doing what you suggest will require lots of external code and I don't think this is going to be something that beginners will be able to follow (experts already know how to do that). Let me think…Regarding 200 variables, there's not much to do at this moment. I will need to (pretty much) re-write Kwik to solve this issue (a maj. However, in order to avoid zillions of issues with current projects, I will not change Kwik until the next major release (version 3).

    eyndrea
    Participant
    #14457

    Ok I understand. It was only to give ideas to make tutorials if they are not very complex for the major part of users. I think the best way to improve kwik is to make the projects with an interactive interface like now. Also it's interesting to have the possibility to add somethings with code. One question only. If I codify the menu and add it in the main.lua file it will appear in all the pages or ca I call it only in some pages?thanks

    Anonymous
    #14458

    It will depend of your code. You will need to create “IF” statement to show (or not) the menu in some pages.

    #14459

    You definitely shouldn't create the entire menu in the main page. Rather require an external page from main. Then call a new instance of the menu in whatever other page you need it.So create your menu in a new page of your project, add a require statement in the main and then call new in every page you want it. I don't have the exact syntax as I'm away from my project but you can research how to do this easily by googling require in corona.

    eyndrea
    Participant
    #14460

    thanks a lot for the ideas.I'll try to get it

    eyndrea
    Participant
    #14461

    Fantastic, I've get  it. Thanks to Alex and KilopopNow I have some pages with the top menu, some with lateral menu, and some with top menu and lateral menu. It's not very difficult. I've seen the post http://kwikplugin.com/forums/index.php/topic,952.0.htmlNow I go to try if in the external menu is possible to have multilingual also.I've one question. If I make a request to external library withmenu = require("page_23") and after call the menu in one page withmenu.new() When I publish one page with two calls of external code is the total of variables = the variables from the pages + the variables from the external code?I say this for the problem with 200 variables

    Anonymous
    #14462

    No, it will not count for the 200 variables limit. In fact this limit are for variables inside a function only.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising