Relative path for media inclusion?

Is there a way to have a RELATIVE PATH for the inclusion of objects within pulse elements, e.g. pictures in blog files.?

(this is a Pulse4 question):

Make sure to use <?php echo $path; ?> so something like:

<?php echo $path; ?>/asset/.jpg

Or you've answered your own question?:

When using Pulse standalone I can put “./content/media/pic1.jpg” as a reference for loading the image. This will be ok when moving the project to a different server.

So this is solved them? I'm confused... :face_with_monocle:

Do you mean e.g. in a blog post to say:

A NEW Blog Post #4.txt


<img src=<?php echo $path; ?>/content/media/screen.png alt="">

1 Like

@pulsecms Could you please give me a hint. This seems not to work this way.

@pulsecms Michael, any help available?

Sorry @Juerg - I’m a bit confused as to what you are asking… :sweat_smile:

As per our private message with by DM with @instacks on the RapidWeaver forum:

Pulse4 standalone has complete standalone relative paths with no problems. You can install in a sub directory or root.

Make sure to use <?php echo $path; ?> so something like:

<?php echo $path; ?>/asset/.jpg

You may also need to change the htaccess file to /subdomain/ in some cases / hosts for RewriteBase /

But linking from the Media folder considers the location and will adapt (relative) accordingly :slight_smile:

So if you add photos in Blogs from the Media it will take care of these. Or use the relative link if hand coding.

1 Like

Ok, we leave that as is. It’s not working for me, maybe because of wrong rewrite rules in htaccess. I’ll skip that for the moment.

Did you modify the htaccess?
You may need to allow RewriteBase /domain/ depending on your host

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.