SOLVED How to insert page into page - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: SOLVED How to insert page into page (/showthread.php?tid=6028) |
How to insert page into page - clarionz - 2014-03-31 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? RE: How to insert page into page - Carlos - 2014-03-31 - Install and activate DynPages plugin. - Create a component named e.g. pagecontent with this: PHP Code: <?php Insert this in your page(s) content wherever you want to insert another page's content: Code: {% pagecontent pageid %} 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. RE: How to insert page into page - Timbow - 2014-03-31 Without a plugin you can insert html into your page as
there are plugins which will help you with different blocks of editable content as well, like the Simple Input Tabs plugin. RE: How to insert page into page - clarionz - 2014-03-31 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... RE: How to insert page into page - Carlos - 2014-03-31 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>) RE: How to insert page into page - clarionz - 2014-03-31 Carlos, thank you, I will take care about it! RE: How to insert page into page - datiswous - 2014-03-31 See http://get-simple.info/wiki/themes:template_tags Code: <?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. |