I have a map and on this map are about 3 images. However the map displays different images on it every month. See code:

 <div class="col-sm-11 map">
                                <div id="container">
                                    {exp:channel_images:images field_id="336" entry_id="{entry_id}" category="included" limit="4"}
                                    <img data-x="{image:field:1}" data-y="{image:field:2}" src="{image:url}" />

                                <div class="map-canvas">
                                    <img src="/images/picture1"/>
                            <div class="xsmall-pad"></div>

How do I specify that I want the images to only appear for a certain month - the title for that month is specified in the 3rd segment of the url. And how do I get the 3 images to overlap on top of the map?


You can access the values of URL segments with {segment_1}, {segment_2}, and so on.

{if "{segment_3}" == "january"}
     <h1>It's January!</h1>

The segment_N syntax is available natively in EE; when you're ready to do more advanced things with URL segments, take a look at URL Helper.


Was more complicated than I first laid it out to be. We had to create a plugin for it. No answer here because the solution specifically fixed a feature that is not found normally. But yes, Nick Benson's points on URL segments is valid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.