You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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!
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
The text was updated successfully, but these errors were encountered: