2010-04-02, 11:53:11
A teaser implementation for the front page?
The following warnings occurred: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
|
Front page Teasers
|
2010-04-02, 11:53:11
A teaser implementation for the front page?
2010-04-02, 19:33:34
Exactly what do you mean by teaser?
You can already give the front page a completely different design by putting an extra template file in your theme folder and choosing this one for the index. This is how the official GetSimple website offers a different front page too.
“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! Zegnåt Wrote:Exactly what do you mean by teaser? Hiya Zegnat -- teaser are short excerpts of new posts. - Usually the title and the first sentence or paragraph of an article. You've probably tried Drupal or WordPress or similar CMS, in which, when you create a new page/post, one of the options is to split the body of the article at any given point and post the the title and 'excerpt' on the front page of the installation/site, so that when you create a new page, not only is a new page.xml file created, but the front-page get updated/concatenated to include the excerpt with a link to the full article.
2010-04-03, 16:52:16
Aa, now I get it.
Well, you’ll need to query all pages the way you would build a menu. Instead of just reading the information for a menu you’ll also make your script read the description field in which you have written a teaser. Then output that data in the form of a list. Though this wouldn’t be so hard, there is no script for it released at the moment (as far as I know).
“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!
2010-04-03, 16:55:28
I have one implememted on my site
Http://www.digimute.com rebuilding my laptop at the mo, will post when i'm doNe mike
2010-04-07, 10:12:19
yeah forget that, I'm using texTile for editing...
I'm adding a random string to pages that I want to print a teaser for , in my case "[***]" When printing out the page I see if this string exists, if it does I print everything up to the string followed by a link to the full page. I also have fancy URLs turned off... Code: echo stripslashes(substr($page['content'],0,strpos($page['content'],"[***]"))); When printing the full page I retrieve the full page, and remove the string before echoing. Code: if ($_GET['type']=="blog"){ Simple and no changes need to the backend... Mike,.,,,
2010-04-18, 23:42:01
I just added a new function to GS called get_page_excerpt($length, $html);
$length = the amount of characters you want in your excerpt. Default = 200 $html = should html be shown or stripped out? Default = FALSE (html is stripped) This will be part of GS 2.02
2010-04-21, 14:21:38
ccagle8 Wrote:I just added a new function to GS called get_page_excerpt($length, $html); Great!
2010-08-15, 23:28:48
for those who didn't upgraded to 2.02 i'm using this function in theme_functions.php:
Code: function get_short_content($page){ and then call in your template or component Code: <?php get_short_content('pagetitle');?> Cheers |
« Next Oldest | Next Newest »
|