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

[Plugin request] Simple blog functionality #44

Closed
robiso opened this issue Sep 19, 2017 · 1 comment
Closed

[Plugin request] Simple blog functionality #44

robiso opened this issue Sep 19, 2017 · 1 comment

Comments

@robiso
Copy link
Collaborator

robiso commented Sep 19, 2017

Simple blog functionality

  • One of the ways to display contents from other pages on one page would be (example) <?php echo wCMS::get('pages', 'about')->content; ?> for fetching the contents of the page about.

  • Another way (posted by wdj) with additional display of titles, description

<?php if (wCMS::$currentPage == 'home'): ?> <!-- What page to display this on -->
        <div class="container marginTop20">
            <?php foreach ( wCMS::db()->pages as $pageName => $page ): ?> <!-- loop though all pages -->
            <div class="col-xs-12 col-md-4">
                <div><a href="<?=$pageName?>"><?=$page->title; ?></a></div>
	            <div><?=$page->description; ?></div>
                <a href="<?=$pageName?>">more...</a>
            </div>
            <?php endforeach; ?>
        </div>
<?php endif ?>
  • This blog functionality should possibly involve a pagination option, so the users can choose how many posts they want to display on a specific page.
  • Additional plus: a way to include only a snippet of the blog/page ("read more" link)
    • in a case where the user would set a limit on how many characters of the blog post/page would be shown - a "read more" link would be appear
@robiso
Copy link
Collaborator Author

robiso commented Nov 3, 2019

A simple blog plugin has been implemented as a plugin with the upcoming WonderCMS 3.0.0.
Happily closing issue with a much wanted feature for a long time!

Thanks to @StephanStanisic for providing us with an awesome plugin!

@robiso robiso closed this as completed Nov 3, 2019
@robiso robiso self-assigned this Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant