Skip to content

How to show the content of a shared md-file in a layout file? #877

Discussion options

You must be logged in to vote

Hello Markus. The class YellowPage let's you access shared pages.

Here's an example layout file system/layouts/default.html:

<?php $this->yellow->layout("header") ?>
<div class="content">
<div class="main" role="main">
<h1><?php echo $this->yellow->page->getHtml("titleContent") ?></h1>
<?php echo $this->yellow->page->getPage("info")->getContentHtml() ?>
<?php echo $this->yellow->page->getContentHtml() ?>
</div>
</div>
<?php $this->yellow->layout("footer") ?>

Here's an example content file content/shared/info.md:

---
Title: Info
Status: shared
---
!!! This website is currently under reconstruction. 
!!! If something looks wrong [contact our webmaster](/contact/). 

There are possibly othe…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by markushuebner
Comment options

You must be logged in to vote
2 replies
@markseuffert
Comment options

@markseuffert
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants