• Is it possible to choose the order of snippets? In other words, if multiple snippets are set to show in the <head>, can the order be chosen somehow?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Temyk

    (@webtemyk)

    Hello.

    There is no special way to change the order of execution. But the snippets are executed in the order they are added, that is, the last (bottom) snippet in the list will be executed first.

    Thread Starter Scott Buscemi

    (@swb1192)

    Hmm, I’m not seeing that to be true.

    I added a “global” snippet that’s meant to be run first. Then the next day I added a page-specific snippet that should be run under it. However, the global snippet was running right after it despite them both being set to run in the head.

    I’d love some way to be able to sort the snippets or at least say “run last”.

    Also, I’d love for the “Current Page” conditional logic to be a bit more clear. The “?” says “An URL of the current page” (typo) but doesn’t make it clear if the domain should be included or not… or slashes before and after.

    Thanks for the swift reply!

    Plugin Support Temyk

    (@webtemyk)

    However, the global snippet was running right after it despite them both being set to run in the head.

    Sorry, I was a little wrong. Snippets are executed in order as in the list of snippets: from top to bottom.
    You are the first who took the order of execution of snippets. It is unlikely that this feature will be much in demand.

    You can select the comparison mode for the Current page logic:
    Equals – then you must enter the full page URL
    Contains – you can enter part of the URL

    I too would like to determine the order of execution for the snippets. This will enable me to break up large snippets into smaller parts. Moreover this enables me to re-use functions.

    I’m not using global snippets by the way.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Determine order of snippets’ is closed to new replies.