Bootstrap one-page multiple carousel combination Samrty

Source: Internet
Author: User
Tags smarty template

Bootstrap when there are multiple rotations on one page, many people encounter situations where only one carousel can be used and the other carousel fails. There is not much information on the Internet. In fact, there will be such a problem, it should be that the ID of the carousel is duplicated, so lead to bootstrap a page multiple carousel.

When I was doing the project, I combined the smarty template, the extensible configuration carousel, and the ability to implement a single page and multiple carousel.

View Layer:

Test data $result = ' {' Service_type ': "Car", "view": {"Picinfo": {"Tag_                          Name ":" Picture Information "," data ": {" pic_1 ": {" explain ":" Vehicle 1 ", "Type": "Text", "Options": "", "Value": [". /.. /.. /web/images/id_card_po ",". /.. /.. /web/images/borrower_contract ",". /.. /.. /web/images/car_dashboard "]}," pic_2 ": {" explain ":" Car Vehicle 2 "," type ":" Text "," Options ":" "," Value ": [" .. /.. /.. /web/images/car_dashboard ",". /.. /..      /web/images/reg_car_info "]}}}} ';  $pictures = Json_decode ($result, true);    becomes an array of $picdata =array ();    $layoutpic =[' picinfo ' =>[[' pic_1 ', ' pic_2 ']]; foreach ($layoutpic as $key = = $kuai) {$dAtakuai=array ();        $temp = $pictures [' View '] [$key];            foreach ($kuai as $hang) {$datahang =array ();                foreach ($hang as $lie) {$a = $temp [' Data '];                $datahang [$a [$lie] [' Explain ']]= $a [$lie] [' value '];                 Var_dump ($datahang);            Var_dump ($a [$lie] [' value ']);        } array_push ($datakuai, $datahang);      } $picdata [$temp [' tag_name ']]= $datakuai;    } foreach ($picdata as $key = + $value) {foreach ($value as $key 1 + $value 1) {} } $smarty-Assign ("Mypicture1", $value 1);

Tpls templates:

 {foreach $mypicture 1 as $a = + $b} <div style= "Float:left; Display:inline "class=" Infoblock mgt "> 



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Bootstrap one-page multiple carousel combination Samrty

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.