GetSimple Support Forum
Documentation for creating a theme? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Themes (http://get-simple.info/forums/forumdisplay.php?fid=10)
+--- Thread: Documentation for creating a theme? (/showthread.php?tid=489)



Documentation for creating a theme? - baris - 2010-03-15

I think it woul be useful and encouraging for new theme developers to prepare a documentation for creating a new theme for GetSimple. Creating a theme for GS doesn't look hard but it's kinda uncool to look at other themes' sources to create a new one Smile).

PS: I know there's a page about template tags to create a new theme but I don't think that even close to be a tutorial. That's more like a glossary.


Documentation for creating a theme? - Zegnåt - 2010-03-15

What more do you want in the documentation? Currently it’s just default HTML and you drop in those functions to link it to the GetSimple system and you’re done. Nothing more is supported by the template engine…


Documentation for creating a theme? - ccagle8 - 2010-03-15

I would be happy to create documentation on this, but I'm kinda with Zegnat here. If I sat down now to write it, it would probably end up just repeating that list of template tags you pointed out. Maybe I will do it anyway...


Documentation for creating a theme? - Carlos - 2010-03-16

Basic sample GS template with most common functions (in bold)

<?php if(!defined('IN_GS')){ die('you cannot load this page directly.');} ?>
<html>
<head>
<title>
<?php get_page_clean_title(); ?>
|
<?php get_site_name(); ?>,
<?php get_component('tagline'); ?>

</title>
<?php get_header(); ?><!-- some meta tags -->
<link rel="stylesheet" type="text/css" href="<?php get_theme_url(); ?>/default.css" media="all" />
</head>
<body>
<div id="header">
<a href="<?php get_site_url(); ?>"><?php get_site_name(); ?></a>
<p id="description"><?php get_component('tagline'); ?></p>
</div>
<div id="nav">
<?php get_navigation(return_page_slug()); ?>
</div>
<div id="bodycontent">
<div class="post">
<h1><?php get_page_title(); ?></h1>
<div class="postcontent">
<?php get_page_content(); ?>
</div>
</div>
</div>
<div id="footer">
<?php get_site_credits(); ?>
<?php get_footer(); ?>

</div>
</body>
</html>

(Don't use it as a base for creating other templates -- better use the Default GetSimple theme.
This can be useful as a tutorial :-) , for copy-pasting functions on an existing html page to "port" it to GS.)

Edit: I've inserted the first line (in red) that will avoid direct access to the template file. It is very recommended to prevent server path disclosure.


Documentation for creating a theme? - ccagle8 - 2010-03-16

Just wrote this up - hopefully it helps: http://get-simple.info/docs/theme-creation


Documentation for creating a theme? - baris - 2010-03-16

That's awesome, thank you so much Smile.

BTW, I have another idea: Since GS uses XML files a lot, wouldn't it be cooler and simpler ( Smile ) to have XML files inside the theme folders, defining the theme's spesifications (which are currently in the CSS file)? I'm guessing that way, GS could process the theme better (but I'm just guessing).