Mengupdate template planet

July 13, 2007

Ketika menginstall Planet Ilkomerz37 saya sempat bingung karena template yang saya edit kok nggak langsung muncul perubahannya di file index planet. Padahal saya sudah menjalankan beberapa kali script untuk meregenarate file index:

./planet.py -o myplanet/config.ini

Di file config.ini saya juga sudah definisikan path ke file template ini.

template_files = myplanet/index.html.tmpl

Setelah diselidiki ternyata yang dibaca oleh script planet adalah file cache-nya yang berekstensi .tmplc.
Jadi solusi-nya adalah hapus file index.html.tmplc atau (*.tmplc) di direktori myplanet. Kemudian jalankan kembali script planet (dengan opsi -o, secara offline).

Sebagai info, untuk file index tidak harus bertype html statis, bisa saja kita sisipkan script PHP atau yang lainnya, caranya ubah saja nama templatenya menjadi, contoh: index.php.tmpl.
Tentu saja daftarkan file ini di config.ini.

Sekian tips-nya.
Sebenarnya saya mau coba aja pake tag <pre>, karena kok kalo pake tag <code> jadi gak keformat HTML di planet-nya. ^_^

Comments »

The URI to TrackBack this entry is: http://anmsid.blogsome.com/2007/07/13/mengupdate-template-planet/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.