Page 1 of 1

Another template

PostPosted: Sat Mar 31, 2012 9:30 pm
by ljhelbo
A customer made me aware of the site They have a lot of templates available under creative commons. I tried to convert one of them to PivotX and it seems to be relatively easy. I wonder if anybody can use this?

I tried to upload the template as an attachment to this posting; but it refuses to accept the file (dont know, if it is too big?). Therefore i placed it here:

Re: Another template

PostPosted: Sat Mar 31, 2012 10:32 pm
by Harm10
We always want people to get involved! Shall I pick up your zip and consider it as a new theme proposal? Obviously you know our themes site Before I am going to look seriously at this converted theme I have to point you to our guidelines: Every new theme has to follow them.
And in the meantime maybe you could share your converting procedure so we can add it to the documentation?
If it is more convenient you can also PM me and receive my mail address.

Re: Another template

PostPosted: Sun Apr 01, 2012 6:57 am
by ljhelbo
Yes, please take it, I just didnt know how to send it ;)

What I did was to take the template and copy it to the template-folder of one of my PivotX installations. These templates consists of just one html-file - named index.html - and a number of css, image etc. Then I made a copy of index.html and named it front.html. And I took the tpl-files and silver.css from the silver-theme and copied them to the same folder.

In my pivotx-installation admin I installed the new front.html as template for the front-page, so I could see how any changes would look like.

I opened front.html with a text-editor and split it into the following files:


The file has comments, so it is pretty easy to see, which part will go into which file. And the files are linked together in exactly the same way as this is done in the Silver-theme (only the file-endings must be changed from tpl to html - just because this allows me to see, which files are the new ones).

Now i compared these html-files to the tpl-files from the silver-theme, starting with _sub_header. I found that most of the content in the tpl-files could simply be copied to the html-files, replacing whatever content was found there.

As soon as _sub_header.html was completed, my PivotX-page looked pretty must like the new template, so from there on I could always check, how my changes worked, by looking at the page. I worked my way through the rest of the files the same way. The content of _sub_main_menu.html was taken from the Baltimore-theme, the rest from Silver.

In the end i had to make a few adjustments to the css-file. E.g. the search-box was not looking correct, so i took the search-section from silver.css and copied it to stile.css. Also i changed H3 to H2 in _sub_sidebar.html, as this was what was expected in style.css.

I believe that was it. And the main advantage is off course, when you dont understand all the tags in detail. Here you can simply copy the entire block from Silver or another existing theme and then look, if it seems right on the screen.

As far as I can see, there are quiet a number of templates that could be converted the same way.

Re: Another template

PostPosted: Sun Apr 01, 2012 7:11 am
by Harm10
Thanks for your elaborate explanation. I've noticed that the mail address for where to send a newly developed theme is not in the guidelines. I'll put it there.
Before I am going to look at your theme would you be so kind as to rename the templates to tpl (and also the includes used)? That would save me a lot of work. And if you are doing that would you also look at the way includes are supposed to be coded:
Code: Select all
[[ include file="`$templatedir`/_sub_header.tpl" ]]

If this is done then I'll pick up the new zip.

Re: Another template

PostPosted: Sun Apr 01, 2012 7:45 am
by ljhelbo
Now it should be ready.

I think the includes are done like that?

I included a theme-file and a jpg as well. However, I made the jpg-file somewhat bigger than 300 x 200 pixels (as the documentation says). When I look at, I really think it would be better, if the images was bigger (maybe 800 x 600). That way it would be a lot easier to get a feeling for the look of the theme. (just my opinion). ;)

Re: Another template

PostPosted: Sun Apr 01, 2012 4:45 pm
by Harm10
Just send you an email.

Re: Another template

PostPosted: Tue Apr 03, 2012 12:30 pm
by ljhelbo
First of all, thank you for the help - nice to see my first theme (scribbled) published here ;)

But if you look at, there are almost 500 free templates and converting them is not such a big problem. I have done three more already (Anther, Wood working and Orange mint). But which one next? If any of the others looks interesting, then please tell me.

Re: Another template

PostPosted: Tue Apr 03, 2012 1:06 pm
by Harm10
Perhaps you could try to convert one called photoshoot. That has a nice array of thumbnails at the top of the page that are clickable. Nice to see them in thickbox or fancybox. I also see that there are paid versions there so anyone who wants to put in requests better not select those..... ;)

Gardenoforchids would also pose a challenge with thumbnails and main picture changing when thumbnail is clicked.

So people which one(s) do we want to be converted?