Easiest way for user to update slider and gallery images?
PermalinkTo create an editable pane in C5 I use the following between div tags so the user can simple use the content editor to add text. This works quite well:
<div class="myWrapper"> <?php $a = new Area('WelcomeText'); $a->display($c); ?> </div>
But what do I do when the mark-up is a little complicated? I would like to get user to update the 2 images and respective links themselves. (see attachment)
What is the easiest way for non-code literate users to do this?
<ul class="Gal_2"> <li class="Frst"> <a href="<?php echo $this->getThemePath(); ?>/Images/TEMP_IMG2.jpg" rel="group"> <img src="<?php echo $this->getThemePath(); ?>/Images/TEMP_IMG2.jpg" width="224" height="150" alt="Island Rab" align="left" /> </a> </li> <li> <a href="<?php echo $this->getThemePath(); ?>/Images/TEMP_IMG1.jpg" rel="group"> <img src="<?php echo $this->getThemePath(); ?>/Images/TEMP_IMG1.jpg" width="224" height="150" alt="Island Rab - Lopar beach" align="right" /> </a> </li> </ul>
Thanks in advance...
PC
Any ideas how to get the relative path to show up?
In the HTML block under image it shows up as:
<?php echo $this->getThemePath(); ?>/Images/TEMP_IMG1.jpg
Which makes me think the PHP code wont run from there? Is there a way to get the path without manually setting the path to this:
/concrete/concrete/themes/greek_yogurt/Images/TEMP_IMG1.jpg
Thanks in advance
PC
Options:
- Add the code directly to the relevant part of a theme.
- create a new block and put your code in the controller or view.
- use designer content to create a block, then modify the created code
- create a new view template for an existing block such as List Files From Set (Without knowing more about your overall project, this would be my personal favourite and recommendation, because all the complicated stuff is already done in a nice c5 way)
If you want to make it even easier:
Create a custom template for the list files from set block that shows the most recent 2 images from the set. The list files from set dialog handles the actual setup of such a list.
There are some examples with List files from set and also with my Image List templates.
http://www.concrete5.org/marketplace/addons/list-files-from-set/...
http://www.concrete5.org/marketplace/addons/image-list-templates/...
You could couple that with a Front End File Uploader
http://www.concrete5.org/marketplace/addons/front-end-file-uploader...
Your user could then upload from the front end popup, knowing it would be scaled and displayed first in the pair.