Add phpcms the carousel figure

For the carousel view of the front of the site, we should also write the picture to the front page of the dead, if we want the staff to add their own background carousel view of it, phpcms also have template image, we just put users incoming image link you can go down, as
Here Insert Picture Description
this is where carousel figure, we only need to replace it pictures here link users to upload pictures, we have for convenience, the extract alone out here as a module listLunBo.html
Here Insert Picture Description
while the original index.htmlis replaced by the
Here Insert Picture Description
Next we create a new section, which is called the carousel Figure
Here Insert Picture Description
and found section of the template can choose listLunBo
Here Insert Picture Description
manage content carousel figure we find Wang Libian add content to
Here Insert Picture Description
select the picture click the start upload
Here Insert Picture Description
click OK
Here Insert Picture Description
at this time is not finished, we click on the thumbnail
Here Insert Picture Description
to upload this picture as a thumbnail
Here Insert Picture Description
display so we click on save publish
course, we must remember what went inside the loop listLunBo.html
following
Here Insert Picture Description
cycle here is still lists circulation, after all, this is a list of a thing, then catid ID designated carousel figure

{thumb($r[thumb], 368, 238)}

This is a thumbnail picture, that is, carousel figure shows the page, fixed format is the way behind the 368 and 238 is the size of the picture, can develop their own, as is this

Here Insert Picture Description
Click on the text to jump to a specific page, you will find, I jumped, but inside I was wearing no picture / ???, amazing! Show.html we use the template, which is a template for writing articles, but writing articles {$ content} seems to only support text, picture how to do? Do not panic, we create a new showPic.html, and the show.htmlinside stuff copied over
Here Insert Picture Description
modified in such a way, you can display the picture, do not worry, we go to modify the template
Here Insert Picture Description
Here Insert Picture Description
to modify the template here to showPic.html
then update the cache, open again, we will find themselves filling into pictures
Here Insert Picture Description
found this picture is too big, we can specify the size of his own, is the front end of the thing, and they can be modified.
Add this to complete our Carousel Figure

Published 62 original articles · won praise 20 · views 5788

Guess you like

Origin blog.csdn.net/weixin_44415928/article/details/104456069