Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting for Show Teaser #16

Closed
agoldenberg opened this issue Feb 8, 2014 · 6 comments
Closed

Setting for Show Teaser #16

agoldenberg opened this issue Feb 8, 2014 · 6 comments

Comments

@agoldenberg
Copy link

This should be put in the config as show full post content or show teaser.

Then user can decide what they want to show.

Then in the theme we can have a statement to check config for setting before showing content in main.HTML.php

@danpros
Copy link
Owner

danpros commented Feb 8, 2014

Andrew,

Yes user should can choose trimmed content or full content for the index page. Not from the theme to keep it light in codes but in functions.php (not confusing if people want to create their own theme), and we should change this call to somethings simple:

<?php echo get_teaser($p->body, $p->url)?>

becomes:

<?php echo get_teaser($p)?>

Actually its enough since in function get_teaser we can extract it, $p->body or $p->url either. We should use this kind of format.

@agoldenberg
Copy link
Author

The idea of putting it in the config means we can call $p->body and based on the config we format the output.

@danpros
Copy link
Owner

danpros commented Feb 8, 2014

Yes we creating new setting on config, let say:

teaser.format = "full"

and to get the value we just need to call:

$teaserFormat = config('teaser.format');

Thanks to dispatch for this simplicity :)

@fahmi182
Copy link
Contributor

fahmi182 commented Feb 8, 2014

+1

@danpros
Copy link
Owner

danpros commented Feb 8, 2014

And we need to add one more file static.html.php so the static page can has different template. I will add it very soon on branch master.

@danpros
Copy link
Owner

danpros commented Feb 8, 2014

I already commit the changes, please try it. Download the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants