Jump to content

Site-Wide Image on Blog Profile?


kory
 Share

Recommended Posts

Hi All,
 
I'm playing around with the Blog Profile and I'd like to figure out the best way to add an image file (ex: a signature) at the bottom of every post. What I love about Processwire is that most times, there is no one way to do things. This also means that I wonder how others are doing it.
 
I've tested my solution by adding:

<?php echo "<img src='http://lorempixel.com/200/200/people/9'>"; ?>

 to the bottom of the .postbody div in post.php. To have a signature (image file) in it's place, I'm unsure if I should create a field, insert it into the post template, etc. or use a different method? Thoughts?

Thanks for any and all help and feedback.

Link to comment
Share on other sites

I certainly don't see anything wrong with your approach, but if you set up a settings page in the admin and added a "signature_image" field to it, it would be easier for you / your clients to change this image in the future. Then you could simply echo the image in the same place using:

$pages->get("/settings/")->signature_image->url();

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...