Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Documentation for creating a theme?
#1
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.
Reply
#2
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…
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
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...
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#4
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.
Reply
#5
Just wrote this up - hopefully it helps: http://get-simple.info/docs/theme-creation
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#6
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).
Reply




Users browsing this thread: 2 Guest(s)