I try to find a solution for that relative absolute path problem but I still dont get it how to solve it.
SO far what I did now is to give a $root path to the project, otherwise its impossible to work locally. My project gets more and more complex and without the possibilty to have real hierachical template or inclusion system I try to have includes over includes. So thats the only way now. But as everything works good, as more I cannot use wappler to have rendered design and previews, as visual part gets broken. Is there any other way to handle path problems?
There is a topic but maybe thats a bit different now.
We allow PHP code in documents, but the PHP code is not executed in the design view of Wappler. The PHP code only works on your webserver, so you should use the browser to preview or rewrite the paths to be absolute.
@teodor I can‘t go with that way, as I need local development. But as I am including a header File where I cannot tell if I am in a subfolder or not, I used just
But that messes up my localhost development.
I need to work locally as I have Internet outtakes and slow connection here. Also its a common way to develop.
Then opened a post here about that relative/absolute path and went with a config file. But then I‘m stuck with design view
@patrick true on webserver it works. Why not rendering in preview, when rendering in code?
@ben exactly similar solution which I‘ll take. Maybe even I‘ll go with configuration path stored in database. That would fix it, as DB live could have different DB as locally and fetch proper URL root path from config DB column. There are alot of ways how to do path handling, but even changing in wappler my Document root doesnt help as my including is getting complex. Templating would help for that headache here.
To better understand what I really try to get is via multiple and different file including to fake some templating, so changes later would need only small changes.
That topic would solve my problem or is related in a way to it :
@alsdigital I saw your simple way to use kinda template or reusable code snippets, which is exactly which I need. How far can you go with your solution and what you suggest for me?