GetSimple Support Forum
How can I include text in GS? - 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: How can I include text in GS? (/showthread.php?tid=1816)



How can I include text in GS? - Bak - 2011-06-06

Good morning to all.

I need an idea to solve a problem.

How can I insert a external text file (ie source.txt) in a page created with GS?

I generally use the "include" PHP function but here does not work.

How can I do?

Thanks


How can I include text in GS? - polyfragmented - 2011-06-06

Hi Bak,

execution of PHP is restricted in pages, but you can use a plugin to make it work:

I recommend the DynPages plugin, because you can use it like a component: You put your PHP into a normal GetSimple component and call it via DynPages then. A cool feature is that you can even pass parametres to the component so you could code a general 'include text PHP script' and pass the text file name/path to it. Makes it reusable.

Usage info can be found on the plugin's page. If you have more questions, feel free to ask.


How can I include text in GS? - Bak - 2011-06-06

Hi polyfragmented,

good idea but there is a problem.

If I create 2 components and I inserted this 2 component in the same page (one at the beginning of the page ad the 2nd at the end of the page) only one is displayed. Why?

Thankyou in advance.


How can I include text in GS? - mvlcek - 2011-06-06

Bak Wrote:If I create 2 components and I inserted this 2 component in the same page (one at the beginning of the page ad the 2nd at the end of the page) only one is displayed. Why?

Just tested it (two times the same component with different arguments plus another component on one page) - works for me!
Maybe you have a blank between { and % or you use the wrong name - see components page, gray code example for correct name.


How can I include text in GS? - polyfragmented - 2011-06-06

Bak Wrote:If I create 2 components and I inserted this 2 component in the same page (one at the beginning of the page ad the 2nd at the end of the page) only one is displayed. Why?
No idea since we don't know how your actual inclusion of the components looks. Can you give us a bit more info or show your template/code/components?


How can I include text in GS? - BrianAWilson - 2011-06-07

Worked for me as well. Thank you, my question was asked and answered before I asked it!


How can I include text in GS? - Bak - 2011-06-28

Sorry for my delay...

All work fine now.

Thankyou for your ideas.

Have a nice day.

Luke