Sep 9th, 2011, 2:11 PM
Ben,
Thanks for the sign posts.
As you stated:
1. If there is ANY syntax error then nothing appears. The simple echo example works.
2. Also I was trying to use the API and my path was incorrect to the global/api directory. Once I fixed the path I was able to pull data from the database.
Also goes to show that you need to think PHP when in PHP mode in the Pages module. I know that sounds obvious but it wasn't when I asked the question.
I have now managed to use the API to show some useful content from the database in pages directly in the UI - this is cool for customers and can be used to build some very powerful reporting. So I am off to get some more PHP code.
I would like to post a short tutorial on this feature - if you like - in the next week or two based on my findings. Its amazing what a little knowledge can lead to.
Finally - and it's not urgent - but would help (and maybe lead to another tutorial) - do you have a few lines of Smarty code I could use to check out how the Smarty mode works? I will then go off to Smarty world (web site) and find out what can be done from there.
Once again thanks a lot for your help.
Regards
Ted
Thanks for the sign posts.
As you stated:
1. If there is ANY syntax error then nothing appears. The simple echo example works.
2. Also I was trying to use the API and my path was incorrect to the global/api directory. Once I fixed the path I was able to pull data from the database.
Also goes to show that you need to think PHP when in PHP mode in the Pages module. I know that sounds obvious but it wasn't when I asked the question.
I have now managed to use the API to show some useful content from the database in pages directly in the UI - this is cool for customers and can be used to build some very powerful reporting. So I am off to get some more PHP code.
I would like to post a short tutorial on this feature - if you like - in the next week or two based on my findings. Its amazing what a little knowledge can lead to.
Finally - and it's not urgent - but would help (and maybe lead to another tutorial) - do you have a few lines of Smarty code I could use to check out how the Smarty mode works? I will then go off to Smarty world (web site) and find out what can be done from there.
Once again thanks a lot for your help.
Regards
Ted