Adding tabbed pages to Wordpress

As a side project I've been working on a way to get all my developing experience out of my CV and into a website. I started doing this in Django because that's what I knew best, but I decided to just implement all my desires in Wordpress. I haven't even begun adding content to my online portfolio, but I have been thinking about ways to display it. One of the things on my wishlist is tabbed pages/posts, so that's what I've been working on.

And here is the result.

My implementation uses a plugin for jQuery called idTabs on the client-side. On the server side I registered a new page type for wordpress for tabbed pages. The tabbed pages are hierarchical. The parent page is empty, and all child pages are added to the html as divs, which are converted to tabs by idTabs. Comments are added to the main post, and can be turned off when not needed. I really should open-source this stuff some time..

 

Posted in Tech | Tagged , ,

jQuery.mobile and Django: nice!

I'm working on a little project in Django, and in the process of learning about writing web pages for mobile devices I came across jQuery mobile. It's a framework that runs on top of jQuery and provides an extremely easy way of creating web pages that look good on mobile devices. I really like working with it. It does have some quirks, though.

Today I got stuck on page navigation. I was trying to submit a form through a post request, yet jqm seems to cache pages permanently once they're loaded, so no content was getting updated. To make matters worse I could not actually request the same page twice after doing a post request, the whole thing just hangs up. This does seem to be a known problem, and there are some workarounds. The easiest one is to disable ajax forms in jqm. I did this, and then changed the form redirect to point to a jquery mobile url (the one with the hash). This seems to have fixed my problem in most of the cases, and also preserves navigation information somehow. Very nice. The only problem I have now is that in some cases the page history still contains a dialog page that shouldn' t be there.

I've been using jquery mobile for a couple of days now and that's really the only problem I encountered. Other than that I've been extremely pleased in working with the api. Functions are where you expect them to be, and all of the things I wanted for my website were already included. My hat off to you, jquery mobile. May you soon get out of the alpha stage and fix the dynamic page issue.

 

Posted in Tech | Tagged , ,