Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED How to insert page into page
I am just started to use GetSimple and really love it! BTW

my question is: how I can insert content of one page into another page in WYSIWYG editor? So let say I have Page1 with some general (constant html rich info) and want to insert its content into other page (or even pages). so I want to reuse it in different pages without typing it again and again (the same info).

Is it possible? how? Huh
- Install and activate DynPages plugin.
- Create a component named e.g. pagecontent with this:
PHP Code:
global $args;  

Insert this in your page(s) content wherever you want to insert another page's content:
{% pagecontent pageid %}
where pageid to the slug/page id of the page you want to insert.)

It's a quickie. It could be improved so that it checks if the slug exists, so that you don't get errors if it doesn't.
Without a plugin you can insert html into your page as
  • html written directly into the template
  • page content (as many as you want inserted into an actual page)
  • components, as many as you want.
You can put a component inside a component but you can't put a component or page content inside other page content although you can have as many blocks of page content as you want.

there are plugins which will help you with different blocks of editable content as well, like the Simple Input Tabs plugin.
wow, Carlos, that was it! Works as I need! Thank you very much!!

Timbow, sorry, but it seems that I don't really understand your idea...
You're welcome.

There's (at least) one catch with this (unless you disable paragraphs in ckeditor): if users are not careful you may end up with some nested paragraphs (<p><p>...</p></p>)
Carlos, thank you, I will take care about it!
<?php getPageContent('slug'); ?>

You can then put that somewhere in a template file and use the template file on a page where you need that page content.

Users browsing this thread: 1 Guest(s)