Skip to main content

Pulling content from a page to another page

Greetings!

The directions for displaying blog post content onto another page (like the home page) is well documented in the theme documentation: Display content from one page on another page.

I want to do something a little more simple, but undocumented. 

I want to make three different text boxes on the home page (in addition to what would normally show up in the {yeild}). The tricky part is that I want to make it easier for the client to edit this text. What I would like to do is make three pages, each page holding the content for one of the text boxes on the home page. 

Then, in the home page code, somehow pull that text into the text box on the home page.

A look through the theme documentation did not reveal a page.content or some other thing which I could use. I was thinking of adapting the {% for post in page.blog.most_recent_blog_posts limit:3 offset:0 %} code, but I can't figure this out without a little nudge.

Rolling this out would be a boon to most of my clients who want greater control over the content in what has been heretofore a difficult place to edit.

Thank you!

Official response from

Hi Tim, have had a chance to look through Richir Outreach's technique for adding admin links to pages? This may be what you're looking for. You can view it here: http://www.richiroutreach.com/nationbuilder-theme-guide/add-edit-page-link-pages-no-sidebar

You can also use the same logic as outlined in the theme documentation to pass certain elements of a page using the {% subpage %} tag.  Instead of including all of the individual post variables shown in the example, you would just use the {{ post.blog_post.content_full }} or {{ page.basic.content }} output tag accordingly. Richir also has a post explaining the process, you can find it here.

 

Share this post

Showing 10 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.