Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
image path in GS 3.x.x
#4
(2014-04-27, 05:01:37)Timbow Wrote: I don't fully understand why, but you can't use php tags in the page content. You can use your get_site_url() php for links in the template and in a component like the sidebar but not in the main page content.

Most CMSes only allow html in page/post contents. Some also use some kind of shortcode system.

Allowing/using php in content can be dangerous. You can easily break your site if you just miss a comma or a parenthesis or anything, and is also a security hole if there are non-admin editor users (if you use some plugin that restricts user privileges)

Just like with e.g. Wordpress (which is similar to GS in several aspects), best solution is using one of the several plugins that allow inserting shortcodes/placeholders for php functions. (e.g. DynPages or ShortCodes in GS)

Anyway if you want PHP you can use the Exec-PHP plugin.
Reply


Messages In This Thread
image path in GS 3.x.x - by phpman - 2014-04-27, 01:01:14
RE: image path in GS 3.x.x - by Timbow - 2014-04-27, 05:01:37
RE: image path in GS 3.x.x - by Carlos - 2014-04-27, 18:11:09
RE: image path in GS 3.x.x - by shawn_a - 2014-04-27, 11:01:46
RE: image path in GS 3.x.x - by phpman - 2014-04-27, 21:36:49
RE: image path in GS 3.x.x - by phpman - 2014-04-27, 23:39:38
RE: image path in GS 3.x.x - by shawn_a - 2014-04-28, 00:09:43
RE: image path in GS 3.x.x - by phpman - 2014-04-28, 05:40:17
RE: image path in GS 3.x.x - by phpman - 2014-04-28, 23:04:25
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 00:45:12
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 00:59:32
RE: image path in GS 3.x.x - by shawn_a - 2014-04-29, 01:03:44
RE: image path in GS 3.x.x - by phpman - 2014-04-29, 01:08:03
RE: image path in GS 3.x.x - by Carlos - 2014-04-29, 01:20:11



Users browsing this thread: 1 Guest(s)