0
Welcome Guest! Login
0 items Join Now

RocketTheme Blog

Gantry5: Rethinking How Positions Work in Joomla

Positions

One of the most difficult and time-consuming tasks associated with migrating your Joomla site from one template to another is having to reassign all of your modules from one position naming scheme to another.

This can be a real chore, especially since your new template likely doesn’t have pre-existing support for the positions you need. In these cases, you would typically have to add the positions manually, in the templateDetails.xml and index.php files.

Enter Gantry5, our coming version of the powerful Gantry Framework, and a completely reimagined positions system. Now, instead of breaking out your text editor to rename and/or create module positions, you can do so with a few clicks of the mouse. This is also easier than going through the modules and reassigning them to the new positions scheme one-by-one.

In addition, you can easily create vastly different positions setups between Configurations, enabling you to have an entirely different positions set and layout from one page to the next.

In this article, we’ll take a brief look at how Gantry5 makes it easier to migrate your site between templates.

Creating, Deleting, and Moving Positions

Positions

In Gantry5, we have dramatically improved the way positions are created, removed, and arranged.

If you want to add a new module position to a page, you simply need to drag-and-drop the Module Position Particle and move it where you would like the new position to appear. At this point, you need but to rename the position Key which is the text reference you would assign modules to in order to have them appear in the position.

Positions

If you are migrating from an existing template, and you have modules that have already been assigned to positions that use the naming convention of the previous template, you can simply rekey your positions to match. That way, you can keep your existing modules without having to reassign them one-by-one.

Deleting a position is just as easy as creating one. Just drag-and-drop the position to the top of the Layout Manager to a section that appears with the label Drop Here to Delete. This will delete the position. If you change your mind, just click the Back arrow in the History tool to bring it back.

If you want to disable a position temporarily (which hides its assigned modules), you can do so by clicking the settings cogwheel on the right-hand side of the position in Layout Manager and toggling the green activation switch in the upper-right area of the Particle settings tab. The position will still show in the frontend but it won't be rendered, so if you would like to re-enable it later on, you can do so.

Moving positions around the layout is also just a matter of dragging and dropping them where you want them to go. If you want your main Showcase modules to appear under the features modules, you can move them without having to edit a single file.

Virtually Unlimited Positions Per row

Positions

In Gantry4, we were able to add up to six modules in each row. Gantry5 enables you to create a virtually unlimited number of individual positions in each row, with as few or as many rows per section as you need.

You could have 0, 1, 5, 10, or even 20 individual module positions in the Header section if you wanted to. This enables you to have one or two positions where you need them, without the need to have positions in places you don’t want them.

Quick and Easy Naming

Positions

As we mentioned earlier, you can name and rename positions on the fly, making it easy to migrate existing modules without having to individually reassign them to specific positions.

You can also freely name them as you need, giving them specific tags that are easy to remember and reference what is and isn’t assigned there.

For example, you could name and key a position as social where you have your social media modules. The reference name and the Key are unrelated to each other, so you could use anything as a reference name (or a key for that matter), as long as you are assigning your modules to the appropriate Key. Naming a position Happy and keying it top-a would be absolutely fine. Whatever works for you.

This frees you from standardized naming conventions that can be needlessly complex and confusing.

Spacers

Spacers

We have created a new Spacer Particle which enables you to create a blank space between two Positions, a Particle and a Position, or two Particles.

Gantry5 introduces many new features that are created to make life easier for developers, their clients, and ultimately the visitors of the site. With its new Layout Manager and this system for handling module positions, it will undoubtedly be not only the most powerful version of Gantry yet, but also the easiest to use.

For more information about Gantry5, please check out these other blog posts from our ongoing series:

Join the Conversation

comments powered by Disqus