Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 02:05 pm EST
Geeklog Forums
PHP in article.thtml
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can't. PHP is only interpreted in header.thtml, not in any other template file.
You can, however, use CUSTOM_templateSetVars (sample code in system/lib-custom.php) to define your own {variables} to use in the story templates.
bye, Dirk
You can, however, use CUSTOM_templateSetVars (sample code in system/lib-custom.php) to define your own {variables} to use in the story templates.
bye, Dirk
9
6
Quote
Status: offline
Pushkar
Forum User
Regular Poster
Registered: 04/14/09
Posts: 99
Location:Ukraine, Kyiv
Quote by: Dirk
You can't. PHP is only interpreted in header.thtml, not in any other template file.
strange, but I've got to make so that the code works in footer.thtml (changes in libcommon)
ok another question: I insert php-code in staticpage and it's works. could i used and showing this staticpage in block (left or right)?
thanks
9
2
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Pushkar
strange, but I've got to make so that the code works in footer.thtml (changes in libcommon)
What I wrote above also works for defining your own variables in footer.thtml. You should avoid changing Geeklog's core code.
Quote by: Pushkar
ok another question: I insert php-code in staticpage and it's works. could i used and showing this staticpage in block (left or right)?
Nope, but you can create a PHP block.
bye, Dirk
9
9
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello,
Yes we can use an autotag in a block.
[staticpage_content:your_page_id]
and your dynamic content from 'your_page_id' page is in the block.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
ok another question: I insert php-code in staticpage and it's works. could i used and showing this staticpage in block (left or right)?
Yes we can use an autotag in a block.
Text Formatted Code
[staticpage_content:your_page_id]
and your dynamic content from 'your_page_id' page is in the block.
::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
6
6
Quote
All times are EST. The time is now 02:05 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content