Posts: 28
Threads: 6
Joined: Mar 2010
2010-03-15, 10:40:52
(This post was last modified: 2010-03-15, 10:42:27 by staseo.)
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
).
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.
Posts: 972
Threads: 27
Joined: Aug 2009
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…
Posts: 1,848
Threads: 86
Joined: Aug 2009
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!
Posts: 3,491
Threads: 106
Joined: Mar 2010
2010-03-16, 02:31:54
(This post was last modified: 2011-11-04, 22:07:38 by fotothink.)
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.
Posts: 1,848
Threads: 86
Joined: Aug 2009
-
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!
Posts: 28
Threads: 6
Joined: Mar 2010
That's awesome, thank you so much
.
BTW, I have
another idea: Since GS uses XML files a lot, wouldn't it be cooler and simpler (
) 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).