I am using Pulse5.1 blocks on a non-Pulse site. I create new pages on my local server using Dreamweaver and upload them to the remote server when they’re ready to publish. In Pulse 3 I was able to use a php “include_once” statement to insert the html block. I could use the same site-root relative file path on my local server as on my remote server.
Is there any way to do this in Pulse5 without changing the filepath in the readfile call when I move between my local and remote servers?
Probably not easily currently - because the install has auto URL detection and file path setting built-in to make it easy to setup and then users would add new Block contents on the server.
We made them absolute so they could potential be used across domains for multi-site management. But relative should also work if you try the relative call.
If not, we can think about adding this in to make it easier in this use case
( ! ) Warning: readfile(…/pulsecms/end_point.php?item=blocks%2Fvehicles%2F566): failed to open stream: No error in C:\wamp\www\Pulse5_test\pulse5test.php on line 92
Call Stack
Relative we’ll have to look at adding that as most situations this is used for embedding sites or content already live so hadn’t imagined this use case, but we can see about adjusting it
5.2 will be out soon and we’ll see about getting this in there if we can
Looking into this more, I don’t think a relative embed url will work in general.
Relative on the filesystem does not map onto relative urls at all.
If the block you want to link to doesn’t contain other pulse tags (or pulse related constants) then a relative path to the block txt file would work.
Otherwise, I would suggest move it onto the server (like a repository or Warehouse method of storage) then link to it using absolute method and it will remain consistent wherever you move your Pulse install.