Aug 25
The implementation of my “Approved” template in Expression Engine
2006 at 01.20 pm posted by Veerle
Time for a small Expression Engine tutorial (further referred to as EE). When I tried to add the pagination links on my Approved page I ran into trouble and my XHTML code didn’t validate. You always have to think carefully on where to put a particular closing tag or your code (and your layout) could get messed up.
EE code for the Approved links
Each Approved link is contained in a list element <li>. In the EE tag I add certain parameters to be sure the page will display the correct list of links in the correct order. I added offset="5" to skip the 5 latest links since these are the links on my homepage. People get to see this Approved page when they click on the "more" button on my homepage. So I don't want EE to repeat these links. I also want only 10 links per page so I add limit="10" and have them ordered by date and sorted descending. I wrap the EE exp tags around the list element but I leave the unordered list tags <ul> and </ul> outside these tags.

Adding pagination links
To add pagination links you use the parameter "paginate" in combination with the paginate tags. The parameter paginate="bottom" will make the pagination links appear below your entries. This is how the EE template code looks:

You have to make sure that the closing ul is located inside the pagination tags and that pagination tags are inside the exp tags. If the closing ul would appear above the pagination tags it would be repeated and it would create a mess. So the opening ul should be outside the exp tags but the closing one isn't. Hope this makes sense and someone can learn from this. I admit that I've spent some time on this before I saw what was wrong in the picture.
14served
1
This is really the first insight into EE that I’ve had and it looks really easy to use. What’s it like to setup and use day-to-day? Is the free version good enough to setup a blog like yours or would it be better buying the personal version?
Many Thanks
Ste
2
Being a web design “noob”, it doesn’t look easy… ;)
How did you stumble upon having to enclose the closing UL within the pagination tags? It wouldn’t even have occured to me to try it your way--having just learned to nest my code “properly”
Thanks for the tute, Veerle
3
Hi Veerle,
I know exactly what you mean by that code. Have seen that kind of thing loads of times when I have been using EE.
It is actually the most easiest CMS tool I have ever come across. Over the years I have gone through just about every one out there on the internet, both paid and free open source versions and whilst a lot of them have good points they also always have bad points and never really give you the freedom to do exactly what you want on a page design. As soon as I saw EE my mind was made afresh. Now I can layout a page in whatever way I see fit. I used to use WYSIWYG editors to code the pages but have now moved across to hand coding straight XHTML / CSS code and with EE it is an absolute breeze!
Once you have followed through the tutorials, which whilst admittedly are a little thin on the ground it will make you want to experiment and learn more. I picked the whole system up in around 6 months and am still finding things that it can do now!
It can be used for anything from a simple blog site to an exceptionally complex business CMS if needed. I can safely say hand on heart that it is without a doubt the most poweful tool on the internet at the moment for creating a website and will grow with whatever level of skills you have.
Once again Veerle thanks for placing fantastic tutorials on your site for all to see and marvel at. Wonderful!!
Best wishes,
Mark
4
I agree 100%. EE is easy to use and implement. The beauty of it is the flexabilty. This site is case in point… Fighting with the code is normal in all CMS’s… It just seems the solution is not so far away with EE.
5
thanks for this information
6
Stephen Hill said:
I managed to set it up myself on a test Mac here and it wasn’t that difficult as long as PHP and MySQL are already installed. They come standard on Mac, I have no idea how hard it to configure those two. Day to day usage is very easy, the admin can be overwhelming at first due to the many options, but you get use to it reasonably quickly. I would recommend buying the personal version just for the support alone. EE has a bit of learning curve but that’s just part of it’s flexibility and there is no support in the core version. In the personal version you also have a more features like photo-gallery etc. You can check the differences in the differences in the 3 licenses on this page and click on pricing and options.
7
Hi Veerle! I love your blog! Already in my Bookmarks toolbar! Congratulations! ;)
I’m wondering if you can help me on choosing one of these tools: EE, Movable type or Wordpress. I currently have a Typepad blog but I just started learning HTML, XHTML and CSS with the book Head First HTML with CSS & XHTML. Have you heard of this book?
Which one you think it would be easier for me at this stage...since I’m not experienced on HTML, XHTML & CSS yet.
Thanks for all you tutorials! Erika ;)
8
Just to thank Veerle who dropped me an email and helped clarifying some of my doubts (see my comment above).
Thanks Veerle! You were really sweet! ;)
9
This one stumps me as well. As a seasoned programmer I would have put it after the closing
{/pagination}tag. What if there is nothing to paginate for example because you only have 12 items? Will the</ul>tag still display?In normal programming environments you would build the list, then after the closing tag you would add the pagination code.
10
Vincent Grouls said:
I’m not sure since I implemented this once I started to have more then 10 links to show. I don’t know what happens with the pagination links if there is only one page. Maybe it shows ‘Page 1 of 1’ and that’s it, or maybe nothing shows up and then you might be right. Really I have no idea.
11
Thanks for this Veerle. I am an EE user and echo everyone else above who thinks it beats about anything else available.
Erika,
I have used Movable Type, Wordpress and EE and would have to recommend EE above the others. Especially if you are committed to learning HTML, etc. and aren’t just content to stick with a typepad layout. EE will not ‘get in the way’ of writing standard code (well not usually, anyway, despite the subject of this tutorial).
I would rate Wordpress only a second best. While it is pretty powerful and has a great community, I found that I was way too reliant on plugins to make my WP sites work as I wanted (same with Movable Type, actually, though of the 3 CMS/blog software I’ve used I haven’t been back to MT recently). I ended up spending so much time sourcing, installing, & updating plugins that it drove me to try EE… and I haven’t looked back.
Good luck with your choice!
12
You go Girl!
Without a doubt, your site has been the most wonderful site I have visited in a very long time. I just wanted to say “Thank You!” for providing a rich source of eclectic material for a novice like me. Your mention of pMachine’s EE was enough to literally change my whole perspective on CMS.
Although I’m a veteran web user, I haven’t been diligent or steady in learning to code. Too dependent on Dreamweaver I guess. But your site is simply inspiring from a creative standpoint. You’re my hero (or is it heroine?). Whatever the correct term, today is the day my brain refused to shrink. And I sincerly have you to thank for it!
13
I wonder while there are tons of Open Source CMS and Blog Systems Out there ,whic seems to be much better than EE,system, so why did you decide to choose a paid system?
14
David said
Depends on what you define as tons of better ones. I would love to see an Open Source system or even a paying one to re-create this blog with no custom PHP and no working against you when building it. EE works like it should right out of the box and I don’t have to spend extra time learning PHP or coming up with ideas to circumvent shortcomings. That’s what I call a good CMS, it doesn’t spit out tons of spans for example and it lets me create a template as it would be a static page.
Secondly EE core is free, I personally chose to pay because of my members that I had from my previous system and for the quality support if I would need it. Also to keep my options open if this would grow in the future.