24/7 Support: 800.608.6482

Videos

Try our new AI assistant by clicking the chat icon in the lower right corner.

Developer Videos

Videos | Global and Local Items

ver. 9.0 and later

Video Transcript

I want to talk about the difference between local items and global items that are assigned to a page. At its core, a local item will only impact that specific page. You can make any changes to it; to its layout, to its settings and it will only change for that page. A global item is assigned to multiple pages and is a single location to make a change. A good example is a global header or footer. When you make a change to global header or footer, that impacts every single page that uses that item. Let's take a look the product page so we can see an example.

So here I'm going to go to the Product Display page and I'm going to jump to the Items tab. I can use a sort in here to show me all these assigned items to this page. And so if we scroll through this list we have the store, we talked about related products, product display, (which is the main display of the product page) and product attributes. Here’s one here, Nav Bar is assigned to this page and say we want to make a change to this. Well, let's jump back to the page itself and here we have the Main Page Template and if we keep scrolling down, we have these different sections. So this one's for a Attribute Machine. I can expand and collapse it over here. Then I have the header and footer (and this isn't the global header footer but the page specific header and footer). So each section that appears here is local to this page. If I make a change to this header and I go to the Category page or the About Us page, there's a header for those pages as well and those are individuals to those specific pages. So these are local items. Now, we were talking about the Nav Bar and so if I keep scrolling down the Nav Bar is not in this list. Product Display, some stuff with Image Machine, Related Product List Layout, so there's no Nav Bar. So if an item is assigned to the page and there’s no section for it here, under these collapsible menus, most likely it's a global item. Now, this isn't always the case because sometimes and item could be local and just not have a tab or a section on the page. But most the time if there’s an item assigned and it does not appear here under the page settings that usually means it's a global item.

So now that we know that the Nav Bar is a global item, where do we find it? Well, that's going to be under “User Interface Settings.” This is where all the User Interface elements live. So over here under Settings, if I scroll down, we should see one for Navigation Bar. This is the Global Nav Bar for the entire site, so any page that uses this item will reference this section here. Now let me show you another quick way to get there. I'm going to come back to User Interface to the Product page. So here's the Nav Bar item that we're talking about. Say I want to quickly jump to that, well you can do what we just did; you can navigate to User Interface Settings, or you can use the menu up here in the top-right to quickly search for it. So if I search for Nav you'll see it pops up here under User Interface for Navigation Bar. I can quickly go there and it will jump me right to that section, which is really nice. Now, this is currently in point and click mode where you can make changes to this text and it will update for you. However, most of the time you’re going to work in Advanced Mode. Advanced Mode gives you access to the code behind what's being displayed here. So here in Advanced Mode I can see all the code that makes up this page and that's really it.

There's not really a big difference between local and global items except where they are located; one can be accessed on the page itself, you either need to search for it using the global search nav or navigate to User Interface and then Settings to make a change. Always remember global items impact every page it's assigned to where as local items, it will only impact that specific page.






Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

Copyright © 1997 – 2024 Miva®, Miva Merchant®, MivaPay®, MivaCon®, Camp Miva®, Miva Connect®, Miva, Inc. All Rights Reserved.