• 45:33

Episode number: 57

All About Variables

Summary

Do you think you know your variables? Think again! We talk about EE’s native variable functionality, the plethora of add-ons that help you manage these variables for faster development AND faster performance, as well as touch on variables that make your client’s life easier.

Tags

Sponsored by

  • Focus Lab LLC
  • Your ad here (dimensions: 520 pixels wide and 60 pixels tall)

Episode Transcript

CTRL+CLICK CAST is proud to provide transcripts for our audience members who prefer text-based content. However, our episodes are designed for an audio experience, which includes emotion and emphasis that don't always translate to our transcripts. Additionally, our transcripts are generated by human transcribers and may contain errors. If you require clarification, please listen to the audio.

[Music]

Lea Alcantara: This is the ExpressionEngine Podcast Episode #57 All About Variables. I’m your host, Lea Alcantara, and I’m joined by my co-host, Emily Lewis. This episode is sponsored by Focus Lab. Focus Lab LLC is an EE shop who believes in the power of teamwork. If you need help…

[Music]

Lea Alcantara:  This is the ExpressionEngine Podcast Episode #57 All About Variables.  I’m your host, Lea Alcantara, and I’m joined by my co-host, Emily Lewis.  This episode is sponsored by Focus Lab.  Focus Lab LLC is an EE shop who believes in the power of teamwork.  If you need help planning, debugging, developing or even training on an EE project, give Focus Lab a call and ask for Erik Reagan, or online at FocusLabLLC.com/eepodcast.

Emily Lewis:  The ExpressionEngine Podcast would also like to thank Pixel & Tonic for being our major sponsor of the year.  [Music ends].  So Lea, I am really, really excited about our topic today because you did a bunch of research on variables and all of it is new to me.  So I feel like I’m going to learn so much during this podcast.

Lea Alcantara:  I think that those listening in, this is probably one of the more important topics, I think, because everyone who touches ExpressionEngine uses variables.  So before we move further, what exactly are variables?

Emily Lewis:  Well, I mean, as far as I’ve used variables in the past, because I think we’ve talked about this before when we had our add-ons podcast, I’ve typically just tried to use EE right out of the box natively, and so before Version 2 I was really using almost exclusively just the segment variables and using those to sort of trigger things.  But with EE 2, I’ve really been using the global variables and the snippets a lot more.

Lea Alcantara:  [Agrees]

Emily Lewis:  And I’ve discovered that I much prefer the native snippets and global variables and utilizing them instead of utilizing so many embedded templates, which is something I had been doing for many, many years.

Lea Alcantara:  Yeah, I totally agree.  When I was transitioning one of my larger client sites from EE 1 to EE 2, when the planning points during that process, I had to figure out what should be in templates and what should be in variables, because sometimes looking at other people’s code at EECI and the samples, certain things looked like they were all put into snippets and all put into some type of global variable or whatever.  But sometimes there is still a need or want to use templates.  For example, I do like to use a lot of native functionality, and one of the things that I like about templates is that you can save that to file and also there is a larger amount of space to use and view it right on the control panels.  So for example, when I have a more complicated large header, HTML header, with a whole bunch of like conditionals or whatever, I actually prefer putting those huge chunks of code into a template rather than a snippet and then little parts that are inside there I’d pull out into a snippet instead.

Emily Lewis:  [Agrees]

Lea Alcantara:  Because for me in terms of editing, et cetera, and so forth, I find it a little bit more useful and I think I also like to use it a little bit.  There is more functionality in a template, so when you are deciding whether I should put something into a snippet, which has a lower overhead, but can render EE tags versus a template, you have to figure out, “Well, do I need to use the database calls in a template?”  So, how about you?

Emily Lewis:  Yeah, yeah.  Well, I just literally a half hour went live with a new client.

Lea Alcantara:  Sure.

Emily Lewis:  And it was one of the first projects where I relied heavily, heavily on global variables and the snippets, and I have experienced exactly what you were describing.  I also am one of those people who like to work with my templates as files outside of the browser, and of course, snippets and global variables, like you say, don’t allow you to have that sort of friendly developer environment to work in.

Lea Alcantara:  [Agrees]

Emily Lewis:  But that said, our discussion with Jacob Russell a few weeks ago and talking about sort of the performance hit that embedded variables can have, that was a big factor for this client.  It’s a rather large site with a fair amount of traffic.

Lea Alcantara:  [Agrees]

Emily Lewis:  And so I kind of just sucked up my discomfort that I have working with them in order to create a more performance site.

Lea Alcantara:  Yeah, yeah.

Emily Lewis:  I will say, though, I noticed you had dug up a little plugin called LibrarEE.

Lea Alcantara:  Yes.

Emily Lewis:  I haven’t used it, but it says that it lets you interact with your snippets and global variables as files rather than in the browser and the control panel.

Lea Alcantara:  Yes, so for example, when I was mentioning the reason for my older site from EE 1 to EE 2, I moved some stuff into templates because it was better for file management for me, but as EE 2 has matured, all these third-party add-on solutions have come up to answer that problem about the inability to edit your snippets and variables, global variables, as files. 

Emily Lewis:  [Agrees]

Lea Alcantara:  So if I was going to do it again like around this time, maybe this time I would probably use something like LibrarEE.

Emily Lewis:  [Agrees]

Lea Alcantara:  So we can still have that optimized performance snippets, but with the nice addition of being able to edit it as a file.

Emily Lewis:  It just occurred to me.  Maybe we should talk to our listeners just a little bit about the difference between the snippets and the global variables in EE.

Lea Alcantara:  Sure.  So the long and short of it is that global variables should be mostly for static elements.

Emily Lewis:  [Agrees]

Lea Alcantara:  So you are not using any EE channel tags or any database hits, it’s mostly like little snippets of information or code that does not need to touch the database.

Emily Lewis:  [Agrees]

Lea Alcantara:  So one example, you may or may not decide to use this, but you can use like footer, a JavaScript, like a whole bunch of your JavaScript embeds or whatever like if you are trying to call on Google for your jQuery and then all your jQuery scripts and all that stuff and you want to bundle all your jQuery calls into one place, you can put that in a global variable instead of a snippet because it doesn’t actually call the database, and then the snippet calls the database.

Emily Lewis:  Right.

Lea Alcantara:  It’s the dynamic portion of the variable side.

Emily Lewis:  Right.  And snippets are parsed first before global variables, right?

Lea Alcantara:  I’m not a 100% sure.  I don’t have the parse order [laughs] in front of me because I’m not a parse order pro like Lowe.

Emily Lewis:  [Laughs]

Lea Alcantara:  But for those listening and those also not a 100% up on all the parse orders, one of the prominent developers in the EE community, Low, has created a PDF called EE Parse Order and I’ll link that to the show notes.  So if you take a look at that PDF, it should tell you exactly which order it goes in, and then I would also encourage our listeners to go to Low’s EECI 2011 talk slide show, which I’ll also link to, which is called Parse Order Pro, which essentially takes his PDF which he handed out the 2010 San Francisco EECI and essentially explains it step by step by step, which is fantastic.  [Laughs]

Emily Lewis:  [Laughs]

Lea Alcantara:  Because it’s one thing for the PDF to just explain the order, it’s another to really wrap your mind around what that means.

Emily Lewis:  [Agrees].  Yeah.  And especially at least I know personally I’m working on with larger and more medium-sized clients than I have in the past.

Lea Alcantara:  [Agrees]

Emily Lewis:  Their sites are bigger and with things like parse order, which I’m just like you, I’m kind of like, “I don’t know,” it’s becoming more important for me to think about these sorts of things when I’m developing the site so that the final site that users are working with is as performing as it can be.

Lea Alcantara:  Yeah, exactly, because it’s all about the performance when you are dealing with variables and templates and then figuring out whether you should the native solution or a third-party solution.  And speaking of that, Low just recently wrote an article.

Emily Lewis:  Yeah, his Preload Replace Variables.

Lea Alcantara:  Yes.  Snippets and Preload Replace Variables instead of embeds.  So as we mentioned before in a previous podcast and earlier in this podcast, embeds while a great way to separate content and use what’s called EE database calls, et cetera, and so forth, it is a performance hog.  It takes up a lot of resources because it calls so many points of the database.  Now, Low, since he’s the parse order pro, sat down and thought a little bit about how he could use the parse order to his advantage, and he has written an article where he explains step by step as well, and I’ll link this in the show notes about how you can use a combination of snippets and preload replace variables instead of embeds in your templates to do almost exactly the same thing without the performance hit.

Emily Lewis:  [Agrees].   And it’s a really straightforward article.  He does a great job of explaining it and giving you a scenario in which this would come into play.  I wish I had read this two weeks ago. 

Lea Alcantara:  Yeah, I know. 

Emily Lewis:  [Laughs]

Lea Alcantara:  I totally agree, and I think another thing that I just wanted to point out in terms of parse order, I think sometimes we are so used to thinking of order as top to bottom.

Emily Lewis:  [Agrees]

Lea Alcantara:  Because that’s a cumulative order.  But parse order is actually related to what calls are being done.  So no matter where you put the call or the variable or the channel loop or whatever in your template, it will render, based on the parse order, not necessarily based on where it’s placed in your template. 

Emily Lewis:  [Agrees]

Lea Alcantara:  And that’s part of the reason why I really liked Low’s presentation in EECI as well as the latest article here in Snippets and Preload Replace Variables.  He explains, “Okay, here is how this snippet looks like and here is how this template looks like and here is a step by step what is being replaced at each rendering step as well.” 

Emily Lewis:  [Agrees]

Lea Alcantara:  So it’s a really good way to think about ExpressionEngine and using its native functionality to do what you want it to do, and I really want to emphasize that. 

Emily Lewis:  Exactly.  I mean, for almost the entirety of up until I went freelance, I almost exclusively used ExpressionEngine out of the box.  Plugins were something for personal reasons I just didn’t use them.  I wanted to use the system as it stood.  That’s changed a little bit over time because the bigger the client in terms of the number of people who are maintaining content to sort of nicer you have to make or you should be making the control panel to make it easy for your users to use the CMS.

Lea Alcantara:  [Agrees]

Emily Lewis:  So I find myself using more plugins primarily to address that issue, but EE out of the box, you can do a whole lot and it’s this exact sort of clever thinking about how the system works that what makes, I think, EE such a great tool, a great system.

Lea Alcantara:  Yeah, I absolutely agree, and one thing that I wanted to point out based on what you just said is that you started thinking about third-party add-ons as a solution for front end client management of the content.

Emily Lewis:  [Agrees]

Lea Alcantara:  Which is interesting, because as developers, sometimes we always think about our own needs first obviously since we are the ones building the site.  We are thinking, “Well, how do I make this easier for me to do what I needed to do.” 

Emily Lewis:  [Agrees]

Lea Alcantara:  But we always have to think about, “Well, is this going to take up resources?” 

Emily Lewis:  Right.

Lea Alcantara:  Is this going to make it harder for my clients somehow?  Or is it going to make it easier?

Emily Lewis:  Right.  Like, for example, snippets and global variables, like I said, I’m using them a lot lately so I’m quite fond of them.  We are friends.

Lea Alcantara:  Yeah. [Laughs]

Emily Lewis:  [Laughs].  But when I handed over the site that went live today, I handed it over for client testing last week, the main admin person, he is someone who may need to touch those snippets and global variables.  Maybe once a year, not often, because the stuff that I have put in there tends to be content that’s not [coughs], excuse me, dynamic in that sense.

Lea Alcantara:  Sure.

Emily Lewis:  But having to take the extra time to be like, “Okay, now you’ve got to go into the template manager and it’s a different interface.

Lea Alcantara:  Yes.

Emily Lewis:  And it’s a different experience for him, and it sort of occurred to me, and of course, reading through all the resources you put together for this podcast, there are tools that allow you to sort of take snippets and the global variables and make them a little bit more easier for your users to work with as opposed to you as a developer who is sort of comfortable with it.

Lea Alcantara:  And it’s not just about making it easier for users to work with, to me, it’s contingency planning.

Emily Lewis:  [Agrees].  Good point.

Lea Alcantara:  Because the moment you start allowing your clients to touch templates…

Emily Lewis:  [Laughs].  Yeah.

Lea Alcantara:  The more likely it is they are going to, A, choose the wrong template, or B, even if they choose the right template, accidentally delete a closing tag or whatever, because as you and I know, sometimes I spend 20-30 minutes looking at a typo.

Emily Lewis:  [Agrees]

Lea Alcantara:  And it’s simply a typo and that’s the reason why the site is completely broken, and if we as professionals do that ourselves, can you imagine the type of chaos clients [laughs] will get themselves into?

Emily Lewis:  Exactly.  And at least as far as I know or at least as far as I could research for this particular client, I did not see any sort of versioning options for snippets or global variables to sort of like a smallest failsafe like templates have.

Lea Alcantara:  No, I think, though, that if you do use something like LibrarEE and it’s able to save to file, then if you are using something like Get or whatever like that, then that’s how you probably deal with the version control.

Emily Lewis:  [Agrees]

Lea Alcantara:  Because once it’s a file, you should be able to use it as any version control if you are using Get or whatever to edit.

Emily Lewis:  Yeah.  Good point.

Lea Alcantara:  Yeah.

Emily Lewis:  Good point, good point.  So I’m really excited.  I really am definitely going to LibrarEE a chance.  But another one that you had kind of pulled together in all of your research yesterday, it’s the template variables add-on.

Lea Alcantara:  Yeah.

Emily Lewis:  And it looks like it creates like a list of where all your variables are.

Lea Alcantara:  [Agrees]

Emily Lewis:  So that you can use them for easy copying and pasting while you are developing. 

Lea Alcantara:  Yeah.  So it’s essentially just an accessory that lists everything. 

Emily Lewis:  [Agrees]

Lea Alcantara:  So it’s grouped together so as you are developing you could just take a look at that instead of having to go through all menu items to find where things are.  It’s just all listed in one place so it makes things very easy to just see it all at once.  Because when you are really good at your naming scheme and your organization and things like that, like still forget where things are.

Emily Lewis:  Absolutely.

Lea Alcantara:  Yeah.

Emily Lewis:  And especially if you are working with another developer.

Lea Alcantara:  Yeah.

Emily Lewis:  The project that I just finished, I worked with a colleague of mine and he did a lot of setting up some of the custom fields and some of the variables and stuff, and we did not do like a paper plan of what the naming conventions were going to be, and so yeah, of his consoling and going into the drop downs and then to my channel fields and then looking everything up individually, this would save so much time for me.

Lea Alcantara:  Yeah, absolutely, and I think that the developer actually created this a while back in EECI 2010 as a response to the annoyances of having to go back and back and forth.

Emily Lewis:  [Agrees]

Lea Alcantara:  So for those that is looking for a solution to avoid the back and forth, take a look at Template Variables.

Emily Lewis:  Yeah, this is a very small, little note, but it’s something that I’m noticed everyone seems to do and it’s worth mentioning is that particularly when working with snippets and global variables, there seems to be like a naming convention where you sort of prefix the name of your snippet with like SN_.

Lea Alcantara:  [Agrees]

Emily Lewis:  And then global variable GV_.

Lea Alcantara:  [Agrees]

Emily Lewis:  I find using things like that can also make it helpful to sort of have some consistency in how you are naming your variables. 

Lea Alcantara:  Yeah.  I totally agree.  I think in the 2010 EECI, Leevi Graham actually had a spreadsheet where he…

Emily Lewis:  Well, that was the most fantastic thing ever. 

Lea Alcantara:  Yeah, exactly.  He had that spreadsheet where he writes it down for his team, “Here are the naming conventions.  Here is where we used plurals.  Here is where we use single nouns and here is where we affix a prefix, and if we are going to affix a prefix, it’s going to be this for this, that for that, et cetera and so forth, and why even figuring that out is really important, especially if you look at, for example, Low’s latest article about the snippets and preload replace, you can essentially have one template pulled from segments, the name of a channel or a category or a section and just have it dynamically pulled and if you have a specific naming convention of your variables, then it just makes everything automated and easy. 

Emily Lewis:  [Agrees]

Lea Alcantara:  [Agrees]

Emily Lewis:  So I wanted to talk just briefly about working with variables with conditionals.

Lea Alcantara:  [Agrees]

Emily Lewis:  Because we had talked with Jacob about performance and advanced conditionals had come up as one of those things that can be a big hog.

Lea Alcantara:  [Agrees]

Emily Lewis:  And I write very complex, if else, kind of conditional statements.

Lea Alcantara:  Sure.

Emily Lewis:  And I don’t know if it’s always the best approach, but I wanted to try and see if I could streamline things and work with them more and I know that when we had talked with Masuga a few episodes ago, he had talked about his experience working with SwitchEE.

Lea Alcantara:  [Agrees]

Emily Lewis:  Which not only can help you with sort of conditionals, but also because the variables you work with with SwitchEE can be expressed as regular expressions, you can determine things like whether a page is the listing or whether it’s a detail page or whatever.

Lea Alcantara:  [Agrees]

Emily Lewis:  So I had a chance to work with it and I have to say that from relatively simple conditionals, and I don’t mean that in terms of performance, they would still be considered an advanced conditional, I guess, by how we parse.

Lea Alcantara:  Yeah.

Emily Lewis:  It’s pretty nice.  I’m not a PHP developer, but it uses like a case that’s native to, I think, PHP where it’s, “In this case, do this.  If it’s in this case, do that in the default cases or whatever.”

Lea Alcantara:  Yeah, yes.

Emily Lewis:  But I had the biggest, biggest problem trying to get it to do more than just reading a variable off of a segment URL or something because regular expressions are incredibly challenging for me. 

Lea Alcantara:  [Agrees]

Emily Lewis:  And unfortunately, the documentation is such that it does not help me.  It doesn’t help me to try and figure out how to determine what kind of page this is with my regular expressions.

Lea Alcantara:  [Agrees]

Emily Lewis:  And I probably spent, I don’t know, maybe too much time trying to figure out how to write the correct regular expression, but fortunately, Mark Croxton who developed Switchee, he also created a plugin called IfElse, and it basically… oh I don’t want to say it basically does the same thing as Switchee, but it basically addresses the issue of parsing the conditional earlier.

Lea Alcantara:  Yes.

Emily Lewis:  And that was much easier to work with.  Basically, I wrap my normal, complex, ridiculous, crazy if else statements with his plugin and it handles it so it parses it in a much more performant manner.

Lea Alcantara:  Yeah.

Emily Lewis:  So when working with conditionals, I must give a thumbs up to IfElse.  I think Switchee has a lot of potential, but it’s potential that, I as a non-PHP, non-back end programming person, I don’t know how to tap into. 

Lea Alcantara:  Yeah.  And I think Jacob even mentioned in the Speed episode that he pretty much uses Mark’s IfElse add-on anytime he needs to use an if else statement nowadays.

Emily Lewis:  [Agrees].  Yeah.  It was very easy to work with, and I felt like it made my conditional variables a lot more streamlined or something along those lines.  They felt better.  I felt like I was doing the right thing.

Lea Alcantara:  [Laughs]

Emily Lewis:  [Laughs]

Lea Alcantara:  It sounds good.  Well, and speaking again of that speed issue, we did also mention this in the Speed episode, Template Morsels by Solspace.  So they call it Template Morsels, but in my opinion it kind of has a snippet feel to it.

Emily Lewis:  [Agrees]

Lea Alcantara:  Because it’s not the template parser that goes through it.  So it’s got a snippet feel, but the difference between Template Morsels and, let’s say, other variable solutions, which we will mention in a second, is that this add-on allows caching of the template codes.

Emily Lewis:  Nice.

Lea Alcantara:  So that’s also something to consider, too, when you are deciding, “Oh, should I use a global variable or a snippet, or should I use an embed template?”  Well, even though embed templates does have a lot of performance issues, you can cache templates.  You cannot cache individual snippets unless you put them in Template Morsels.

Emily Lewis:  Very good point.

Lea Alcantara:  Yeah.  So speaking of those other variable add-ons that I mentioned that doesn’t allow caching, but allows you to manipulate and add template, sorry, not your templates here, but variables and your snippets, there is Low Variables. 

Emily Lewis:  Yes.

Lea Alcantara:  Yes.  And that’s the one that I’m most familiar with.  That’s the one that I’ve used on multiple client sites and for those who are concerned about your clients going into templates, Low Variables has a module that you can just allow a specific member group to view, and in that interface you are able to use a lot of different types of field types essentially.  So you can edit your snippets either as a dropdown or a check box, basically all the default EE field types you can use to edit your variables.  So now, that’s another thing that I should mention, the limitations of snippets and global variable is just the text box.

Emily Lewis:  Right, exactly.

Lea Alcantara:  Yeah, so when you are trying to figure out whether you should go to a third party, et cetera and so forth, well, for us, it’s easy for us to manipulate HTML code in the text box, but for clients, not so much. 

Emily Lewis:  [Agrees]

Lea Alcantara:  So yeah…

Emily Lewis:  I also love how Low Variables lets you group your variables. 

Lea Alcantara:  Yeah.

Emily Lewis:  Which I think is really important from a client/user standpoint.

Lea Alcantara:  Yeah.  For example, if you decided to create a whole bunch of sidebar snippet in code, then you could just have a group called Sidebar and then you just tell your client, “Well, if you need to edit this little widgety thing here, then you just need to click on Sidebar and click on widgety thing.”

Emily Lewis:  [Laughs]

Lea Alcantara:  Right?  So it’s pretty straightforward, and because it’s using default EE field types, it seems natural to them because these are the field types that are available to them in the channel form, the published form, so it’s something that wouldn’t take too much to train them on.

Emily Lewis:  Right.

Lea Alcantara:  I think the only little thing would be is to make sure that they have an easy link to get to it which you could do default by just adding it to the main control panel or you could use a third-party add-on that totally changes the control panel so it’s always there for them.

Emily Lewis:  Yeah.  I mean, I can’t stress it enough at least from having just launched a project with a client, this sorts ExpressionEngine natively and then these sorts of add-ons that I was able to use, they allowed me to hand over a system I was so proud to hand over to and so comfortable that the users would be able to pick up how to handle their own content very easily, and it’s only how we develop the templates and the actual site and all that other stuff, but how we create a control panel that lets the users feel like they can take full ownership of all of their content.

Lea Alcantara:  Yeah, absolutely, absolutely.  I just wanted to also mention that Low Variables does have Wygwam compatibility as well.

Emily Lewis:  Right.

Lea Alcantara:  So one of the custom field options need to be blurb in the sidebar that they wanted to have bold and italics an image or whatever.

Emily Lewis:  [Agrees]

Lea Alcantara:  You’ve got that option for Wygwam and if they are used to Wygwam in the channel entries, then there you go, you don’t need to train them on how to use it again.  Another thing that I wanted to mention about Low Variables is that I remember when I first started experimenting with it I was trying to figure out, “Well, do I get this to behave like snippets?”  Mostly because when you use Low Variables, it starts looking in your global variables listing, so it looks at what already exists there and that’s where it puts all the information.  Okay, it puts it in the global variables wherever table in ExpressionEngine.

Emily Lewis:  [Agrees]

Lea Alcantara:  However, as we said earlier with global variables, it’s mostly for static items, how are you able to use ExpressionEngine tags into Low Variables?  Well, all you need to do is make sure when you are editing or adding or creating a variable there is you click Early Parsing on there.

Emily Lewis:  Oh cool.

Lea Alcantara:  And so then if you use Low Variables and when you are creating one and you just click Early Parsing, which is an option when you are creating the variable, then it essentially behaves like a snippet.

Emily Lewis:  Cool.

Lea Alcantara:  Yeah.  And like I haven’t used this one, but I need to also mention that if Low Variables isn’t necessarily what you are looking for, and let’s say, you are using structure, which I know a lot of ExpressionEngine developers are using as well as user, there is an add-on by Brian Litzinger called Super Globals.  So Super Globals essentially has similar functionality and it also has custom field options available with mostly default EE fields.  It does not have at least based on what I read with Pixel & Tonic’s Wygwam options or whatever, but the custom default fields are there, but it is compatible with user tags and structure tags so if you need to auto create navigation links via Super Globals via a variable, so if you want your clients to edit or you to edit navigation using structure but you want to put it in a little variable, then Super Globals is probably a good solution for you in regards to that.  So I think I haven’t used it at length, so that’s as much as I could glean from the information and the documentation I saw on the site.  Another thing, too, is if again like whenever you are thinking about what third-party add-ons you want to get, “Is the third-party add-on almost an overkill for all the functionality?”

Emily Lewis:  A good point. 

Lea Alcantara:  Yeah.  So Brian has also come out with something called Super Globals Lite.  So both Super Globals and Super Globals Lite are commercial add-ons, but the Globals Lite version is a little bit less expensive because it’s got the functionality of the extension, but it doesn’t include the module which you can edit with the different field types, et cetera, so if you wanted that type of interface and functionality for your variables, that’s available for you.  But if you don’t need your client to edit it, then you don’t need the module.

Emily Lewis:  Right.

Lea Alcantara:  So might as well just get the Lite, right?

Emily Lewis:  Right.  And that’s a good point you bring up, an excellent point about overkill, and it always at least in my mind for anything, whether it’s an ExpressionEngine plugin or a JavaScript plugin or something, it’s always about the project. 

Lea Alcantara:  Yeah.

Emily Lewis:  I almost never like start a project with a list of these are the ten things that will be used.

Lea Alcantara:  Yeah.

Emily Lewis:  I look at the project for what it needs and evaluate, and typically, I’m kind of evaluating as I go along.  I sort of discover I need something maybe midway through. 

Lea Alcantara:  [Agrees].  And earlier on we were mentioning LibrarEE, which is super, super powerful.  It allows you to deal with snippets, global variables and specialty templates as files, but in the same vein of, “Well, maybe that’s overkill for me,” Brian Litzinger has also come out with something called Snippet Sync, which just deals with the snippets and allows us to manage your snippets in your file system like a normal template as well.

Emily Lewis:  Nice.

Lea Alcantara:  And it’s saved in your like snippets folder and it turns into a dot HTML file, all that fun stuff.  So when you are thinking about that like is LibrarEE like all I want to do is deal with files with snippets and they don’t need specialty templates and variables or all these bells and whistles, maybe all you need is Snippet Sync, right?

Emily Lewis:  [Agrees]

Lea Alcantara:  But then on the opposite end of the spectrum, let’s say that’s not enough.  You look at LibrarEE, you look at Snippet Sync and you are like, “Well, you know, it would be nice if I was able to work on my files like it’s on my desktop.”  Now, the solution for that is an add-on, and this is only Mac people, so sorry PC people. 

Emily Lewis:  [Laughs]

Lea Alcantara:  There is an add-on called MountEE.

Emily Lewis:  Yeah.

Lea Alcantara:  So it allows you to mount your snippets, variables, templates and more like a folder on your Mac, so it’s sort of similar to LibrarEE, but it actually mounts the folder, so with people who are familiar with something like Dropbox, example, it basically creates or you can associate a folder on your desktop.

Emily Lewis:  [Agrees]

Lea Alcantara:  And it basically is actually hooked up to your server.

Emily Lewis:  [Agrees]

Lea Alcantara:  And so the edits that you do there for snippets, variables and templates, it’s mounted like a folder, so it’s as if you are dealing with that locally almost, so that’s MountEE.

Emily Lewis:  That’s awesome.  I was just looking at there.  I’ve heard a lot of people talk about it.  I’ve not used it myself.

Lea Alcantara:  [Agrees]

Emily Lewis:  But they’ve got a 14-day trial.  I think I’m just going to try it today because that just looks fantastic.

Lea Alcantara:  Yeah.

Emily Lewis:  And I am a Mac person.

Lea Alcantara:  Yeah.  So like I mean, it’s great, especially if you want to use your favorite editor and all that fun stuff.

Emily Lewis:  [Agrees]

Lea Alcantara:  I’m looking at the page on Devot:ee and there is a lot of fans. 

Emily Lewis:  Yeah.

Lea Alcantara:  There are a lot of reviews and fans for this add-on, so it’s something that I haven’t used yet, but it’s something that I’m definitely curious to take a look at.

Emily Lewis:  Yeah, I’ve certainly heard a lot of good comments about it.

Lea Alcantara:  And another thing that I wanted to mention, another add-on that I found, and this is the first time I actually heard about this one, it’s called the Editee.

Emily Lewis:  [Agrees]

Lea Alcantara:  And again, when you are thinking about, “Okay, maybe I don’t need all the custom field types like dropdowns or whatever, so I don’t need Low Variables or Super Globals, and maybe I don’t need my clients to access it, but I need a way to edit things really quickly without having to open Coda and do all that dance with the FTP and then like loading everything.”  Let’s say you are already in the control panel, but you need to edit something, Editee is there so it pretty much adds this…

Emily Lewis:  A text editor like highlighting and stuff. 

Lea Alcantara:  Yeah, exactly.  So it’s actually more powerful than the editor that you have in templates.

Emily Lewis:  Yeah.  Well, and also this is so small, but it’s so annoying when you are working in those plain text areas for global variables and snippets.

Lea Alcantara:  Yeah.

Emily Lewis:  You can’t tab.  You can indent, like you can install a browser plugin that will fake it.

Lea Alcantara:  Yeah.

Emily Lewis:  Then you have to turn that off on every other site you visit.  This gives you that sort of you can indent and it highlights code, that sort of stuff.

Lea Alcantara:  Yeah, exactly, and I just wanted to mention that this source code editor isn’t just for the snippets and global variables, it also is an add-on that adds a source code editor to your templates as well as template notes and database query form text areas, so you are able to have just a little bit more functionality to edit your code.  I also just want to mention because I do have a little bit more experience with Low Variables that he does have a little check box also when you are creating your variable if you want to have this in “code view” versus just whatever, you know.

Emily Lewis:  [Agrees]

Lea Alcantara:  Especially if this is a text area, you can have this code view or not, and code view gives it like a black background with like the different colored text as well.  So it doesn’t give you the editor stuff at the top, let’s say, as Editee does, but it actually gives you like the code styling that we are used to in most editors.

Emily Lewis:  [Agrees]

Lea Alcantara:  So that’s also pretty useful as well, and it’s something like with Low Variables, you can also edit how many rows to show right away, although for me like especially if you are a developer that knows how to use your browser, it’s pretty easy to increase the window, and in Low Variables if you need to edit or whatever, there is like that little bottom right hand corner that you can just click and drag.  So for those that don’t know, I guess, and you want more real estate to edit your text, make sure you just click on the bottom right hand corner of that text area and you should be able to drag it to be as tall as you want when you want to edit that.

Emily Lewis:  [Agrees]

Lea Alcantara:  And I prefer that than setting a large number for the rows, especially with clients because I want them to see a lot more on their screen when they are trying to figure out what they want to edit first.

Emily Lewis:  [Agrees]

Lea Alcantara:  As opposed to like, “Oh, here is a giant block of text,” and they have to scroll down to find my other variables.

Emily Lewis:  Right.  You know, there is one more add-on I saw that you had gathered and that it really attracted my attention, Mo’ Variables.

Lea Alcantara:  [Agrees]

Emily Lewis:  In particular, because it’s allows for reverse segment variables. 

Lea Alcantara:  Yeah, yeah.

Emily Lewis:  Which I have not had an opportunity to actually work with that, but I could see that becoming very useful for me.

Lea Alcantara:  Yeah, absolutely.  So this was Mo’ Variables.  It’s free and it was created by Rob Sanchez of Barrett Newton, and essentially, it just adds more early parsed, which is important, or early parsed, global variables to your installation.  So ExpressionEngine comes with a whole bunch of variables for you to use already like site name and stuff like that you can pull, but once in a while, there are important variables that you just want to be able to use.  Another really important one that I think is really important is “If Paginated.”

Emily Lewis:  [Agrees]

Lea Alcantara:  So with that, for example, right now, one of the things about Switchee is that you have to use Regex, too, and then you put in like a whole bunch of gobbledygook to go, “Okay, yeah, this is a paginated page.”  

Emily Lewis:  [Laughs].  Exactly.

Lea Alcantara:  Do you know what makes sense to me as a non-programmer?  If paginated!

Emily Lewis:  If paginated!

Lea Alcantara:  [Laughs]

Emily Lewis:  I couldn’t agree with you more. [Laughs]

Lea Alcantara:  Yeah, exactly, exactly.  So with certain things like current page URL, if paginated, reverse segments or segment starting from X, those little things that just makes things a little bit more efficient and it just gives you a little bit more functionality because sometimes I think one of the more powerful things about ExpressionEngine is the ability to pull information from segments. 

Emily Lewis:  [Agrees]

Lea Alcantara:  That it understands that this thing is an entry ID or this thing is a category, and it’s all based on segments and it makes it really powerful when you are creating your templates.

Emily Lewis:  Yeah.  All I can say is I wish we had done this podcast two weeks ago because I learned so much that there are so many different approaches and add-ons I think that really if you just do a little bit of research, and I wished I had done it, but there are so many great ways to really extend ExpressionEngine, whether it’s extending its native functionality like Low described with his snippets and early…

Lea Alcantara:  And preload replace.

Emily Lewis:  Right.  Or some of these like this Mo’ Variables.  I mean, for example, the Mo’ Variables will do a get and post variables.

Lea Alcantara:  [Agrees]

Emily Lewis:  Which I recently did something with Google Maps where we needed latitude and location pulled early on in the page rendering.

Lea Alcantara:  [Agrees]

Emily Lewis:  This would have been fantastic if I had known about it.  [Laughs]

Lea Alcantara:  Yeah.  Well, exactly.  I mean, that’s the thing about ExpressionEngine and why I keep going with this podcast. [Laughs]

Emily Lewis:  [Laughs]

Lea Alcantara:  Because there are so many new things that’s coming out with so many smart people that look at Expression with a little bit of a different eye and are able to manipulate it and answer questions and figure out problems before we can even figure it out.

Emily Lewis:  [Agrees]

Lea Alcantara:  Because I think the good and the bad about ExpressionEngine is that it can do anything you really want it to do, right?

Emily Lewis:  [Agrees]

Lea Alcantara:  And that means there are a million and one ways to do the same thing. [Laughs]

Emily Lewis:  [Laughs]

Lea Alcantara:  And they are all legitimate depending on the scope and client and all these issues.

Emily Lewis:  [Agrees]

Lea Alcantara:  So having all these types of resources available is I think really special to ExpressionEngine.

Emily Lewis:  Absolutely.

Lea Alcantara:  All right.  So this was a super long episode. [Laughs]

Emily Lewis:  [Laughs].  It went longer than I thought it would, but…  [Laughs]

Lea Alcantara:  Yeah, but I wanted to make sure that we covered a lot.

Emily Lewis:  It’s good stuff.

Lea Alcantara:  Because this is like pretty much one of the bread and butter of ExpressionEngine.

Emily Lewis:  It’s really makes Expression powerful.  It’s great.

Lea Alcantara:  Exactly, with templates and variables, right?  This is how we get our information onto the page.  So I think that should be all about the time we have for today. [Music starts] We would like to thank our sponsors for this podcast, Focus Lab and Pixel & Tonic.

Emily Lewis:  And we would also like to thank our partners, EllisLab, EngineHosting and Devot:ee.

Lea Alcantara:  And thanks to our listeners for tuning in.  If you want to know more about the podcast, make sure you follow us on Twitter @eepodcast or visit our website at ee-podcast.com. 

Emily Lewis:  And don’t forget to tune in next time.  Ryan Masuga will be talking to us about upgrading the EE 2.  That’s going to be on Thursday, December 8th.  I know I don’t want to miss it and I know we have several listeners who are very excited about hearing about that process.

Lea Alcantara:  [Agrees]

Emily Lewis:  Be sure to check out our schedule on our site, ee-podcast/schedule.  We’ve got some fantastic topics lined up well into the New Year.

Lea Alcantara:  This is Lea Alcantara.

Emily Lewis:  And Emily Lewis.

Lea Alcantara:  Signing off for the ExpressionEngine Podcast.  See you next time.

Emily Lewis:  Cheers.

Love this Episode? Leave a Review!

Emily Lewis and Lea Alcantara

CTRL+CLICK CAST inspects the web for you!

Your hosts Emily Lewis and Lea Alcantara proudly feature diverse voices from the industry’s leaders and innovators. Our focused, topical discussions teach, inspire and waste no time getting to the heart of the matter.