In October CMS, how can I make an image editable on a static page?

I would like to create a general marketing template using the October CMS plugin "Static Pages". The goal is to allow my clients to create their own marketing pages. Suppose my layout contains HTML similar to this:

<img src="/path/to/image.jpg"> <hr> <p>Some uneditable copy</p> {% placeholder copy default title="Main Page Copy" type="html" %} <h1>Some Awesome Headline</h1> <p>Sea no omnium deserunt, eum tale movet sensibus te.</p> {% endplaceholder %} 

How can I let my customers change the image?

+4
source share
2 answers

You have a full explanation here https://octobercms.com/blog/post/building-client-friendly-websites

Add this code to your layout

 {variable name="banner" label="Banner" tab="Header" type="mediafinder" mode="image"}{/variable} 

and this is in your html markup

 <img src="{{ banner|media }}" alt="" /> 

You will see an additional field in your backend

+4
source

It is not currently supported: https://github.com/rainlab/pages-plugin/issues/13 , but maybe you can use the media manager

0
source

All Articles