6

What is difference between Adding Item or file Dynamically or statically while creating sitecore packages?

3 Answers 3

9

Based on the Sitecore documentation:

You should use static sources when you want to include all the items or files that are stored under a specific node or folder in the content tree or if you only want to include a few specific items or files.

You should use dynamic sources when the items or files that you want to include cannot be easily selected, for example, if you want to include everything created after a certain date.

9

Adding to what Tamás answered

Static items: is a flat list of items that you want to add to a package. This is useful if you want to move items x, y and z from environment A to B.

Dynamic items: you select the items you want but want to apply custom filters to it(such as item name, creation date, updated within the past x days or within a range of dates, publish date). If you need to apply any of these filters you can't just by using a flat list so this is when dynamic items package becomes useful.

2
  • 7
    Also; package definitions can be saved and re-executed later. A dynamic package would catch new items that were not in place when the package was originally set up.
    – Mark Cassidy
    Commented Nov 27, 2019 at 13:59
  • you are right. thanks @MarkCassidy
    – Diego
    Commented Nov 27, 2019 at 14:03
1

Sitecore package designer allow us to add the following to our sitecore package:

  • Sitecore Items.

  • Files (configuration, dlls, CSS... etc.)

  • Security accounts

We can add the above items in two ways:

  • Static
  • Dynamic

We use Static specially when we know the exact items name and their path. We use Dynamic when we don't know the items name and path, but we know criteria based on which we can filter items that need to send from one environment to another.

See the below blogs to know how can you use Dynamic methods to push content:

http://sitecoreinfo.blogspot.com/2016/04/sitecore-package-designer-dynamic-items.html?_sm_au_=iVV8pNnrQsHZbJPj

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.