Jump to content

mrkhan

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by mrkhan

  1. i am trying to create a product carousel in PW from last few days but can't figure out what i am doing wrong. here is HTML of carousel which is working fine. <div class="box producttabs"> <div class="tab-nav"> <ul id="producttabs304244223" class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#tab-latest304244223">First Tab</a></li> <li><a data-toggle="tab" href="#tab-featured304244223">Second Tab</a></li> </ul> </div> <div class="tab-content"> <div id="tab-latest304244223" class="tab-pane box-products tabcarousel304244223 slide active"> <div class=""> <a data-slide="prev" href="#tab-latest304244223" class="carousel-control left">‹</a> <a data-slide="next" href="#tab-latest304244223" class="carousel-control right">›</a> </div> <div class="carousel-inner "> <!-- repeat --> <div class="item active"> <div class="row-fluid box-product"> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-4.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-5.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-6.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-7.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> </div> </div> <!-- repeat --> </div> </div> <!-- end of tab --> <div id="tab-featured304244223" class="tab-pane box-products tabcarousel304244223 slide"> <div class=""> <a data-slide="prev" href="#tab-featured304244223" class="carousel-control left">‹</a> <a data-slide="next" href="#tab-featured304244223" class="carousel-control right">›</a> </div> <div class="carousel-inner "> <div class="item active"> <div class="row-fluid box-product"> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-8.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-1.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-2.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-3.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> </div> </div> <div class="item "> <div class="row-fluid box-product"> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-5.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-6.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-7.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-8.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> </div> </div> </div> </div> </div> </div> if you see in above HTML code there is two tabs and product carousel. one thing important is each 4 items are inclose in <div class="item"> and first div of tab will be <div class="item active"> i am using bellow code in PW but output is coming wrong and page disturb <div class="tab-content"> <div id="tab-latest304244223" class="tab-pane box-products tabcarousel304244223 slide active"> <?php $children=$pages->find("template=product,product_cat=1014,show_main>0"); if($children->getTotal() >0){ ?> <div class=""> <a data-slide="prev" href="#tab-latest304244223" class="carousel-control left">‹</a> <a data-slide="next" href="#tab-latest304244223" class="carousel-control right">›</a> </div> <div class="carousel-inner "> <?php $j=1; $active="active"; foreach($children as $child) { if($j==1) { echo "<div class=\"item $active\"><div class=\"row-fluid box-product\">"; $active=""; } ?> <div class="span3 product-block"><div class="product-inner"> <div class="image"> <a href="#"><img alt="Loves or pursues" src="products/image-4.jpg"></a> </div> <div class="wrap-infor"> <div class="name"><a href="#">Loves or pursues</a></div> <div class="description">Samsung Galaxy Tab 10.1, is the world's thinnest tablet, m...</div> </div> </div> </div> <?php if($j==5){ echo "</div></div>"; $j=1; } ?> <?php $j++; } echo "</div></div>"; } ?> </div> </div> </div> if you see in my code i am using variable $j to count number of products and when product reach 5 i end the two div and make $j to 1 to create another <div class="item"> but active is only once. i am also trying to close two more div at end. thanks for heloping
  2. I am using PW from 1 week and Love this , its really simple and amazing and development time is so less. i am developing one application which show links (URLS) and admin will post these links from admin panel. now i am trying to have a user section where user will login and after login user can save these URLS in his FAV box. i am searching on forum from last 3 days and found so many codes but i can't figureout how to get what i want. i want normal user register / login / profile / logout / forget password section. in user profile, user can update its details , change password and see FAV links which he saved before. i will really appreciate any help with code or appropriate link or module etc. Thanks
  3. yes i know about module MarkupSimpleNavigation? but the only problem with that we can't choose which pages we want to display on menu. also we can't have multiple menus in page like top menu , side menu, footer menu. what i am trying to do is to create pages for top menu, side menu , footer menu and assign them to pages as i want. i am new to PW and really loving it, its really simple. i just want to get your help again, if you can please now menu work perfect but i want to assign current page class "active current" i mean any page i click on menu or submenu, main menu should be assigned class "active current" Thanks
  4. Dear yes but i want to get contents of that page. thats why i am using $pid=$page->page_side_menu; $paged=$pages->get($pid); echo $paged->title; when i have that page in $paged then i can get all fields store in that page. Thanks
  5. in my page i store value of page by using page type field, field name is: page_side_menu when i call that field in template using $pid=$page->page_side_menu; echo $pid; i can see the page number but when i use bellow code i return me page title of home page not selected page. $pid=$page->page_side_menu; $paged=$pages->get($pid); echo $paged->title; why i am getting title of home page not page with id in $pid. Thanks
  6. Hello kongondo, thats solved my problem. thanks so much.
  7. Hello kongondo, yes it worked and really thank you so much. now if some page have child pages, how to check in loop and get child pages also. once again thank you so much.
  8. Hello thanks for quick response and so effort but still here user can add 4 menus, but i don't want to put limit to menu items for user thats why use repeater so that use can add as much he want without modifying the template. how can i do that?
  9. my menu page is as bellow http://postimg.org/image/md4wrrzv5/ can you plz write code for me how to loop $menu_item as i did as this but it did't work <?php $top_menu=$pages->get("/top-menu/"); foreach($top_menu->menu_pages as $menu_page) { foreach($menu_page as $menu_item){ ?> <li class=""><a href="#"><?php echo $menu_item->tile ;?></a></li> <?php }} ?> or simply if you can help me how to make a page in admin panel where i can add as many pages i want and these pages should display in menu. Thanks
  10. Hello, when i run the above code display object Thanks
  11. Hello kongondo, thanks for kind reply. i actually need repeater as don't know how many pages i will add in menu. i also modify my code as bellow as you said i need one more loop <?php $top_menu=$pages->get("/top-menu/"); foreach($top_menu->menu_pages as $menu_page) { foreach($menu_page as $menu_item){ ?> <li class=""><a href="#"><?php echo $menu_item->tile ;?></a></li> <?php }} ?> but its also not working. its showing lot of | signs but no text. thanks
  12. hi adrian, thanks for reply but $menu_page->title did solve my problem let me explain again. i want to create custom menu page my self which i can control from admin so 1. i created a new template name top-menu 2. i created a repeater name menu_pages 3. in menu_pages repeater i add a field name menu_page which is page type after 1. i create a new page with top-menu template 2. and add 4 menu_pages repeater & select 4 pages. after 1. i put following code in head.inc file <?php include('top-menu.php') ?> after i write this code in top-menu.php <?php $top_menu=$pages->get("/top-menu/"); foreach($top_menu->menu_pages as $menu_page) { ?> <li class=""><a href="#"><?php echo $menu_page->tile ;?></a></li> <?php } ?> This is not showing page name. as i write before i want to have option in admin panel to create my own custom menu and display on website. Thanks
  13. Hello, i want to create two custom menus on my website and want to have option to add some pages in one menu and some in second page. i have created one template called top-menu this template is using repeater name "menu_pages" for page, so that i can add as many pages i want. filed name in repeater is "menu_page" after that i am calling that page in my template like that <ul class="sf-menu "> <li class="current active"><a href="<?=$config->urls->root;?>">Home</a></li> <?php $top_menu=$pages->get("/top-menu/"); foreach($top_menu->menu_pages as $menu_page) { ?> <li class=""><a href="<?php echo $menu_page->url ;?>"><?php echo $menu_page->page-tile ;?></a></li> <?php } ?> </ul> but i am getting output Home | 0 | 0 | 0 also i want to check if page have child pages then again sub menu will be created every time page have child page. i can't figure out how to do that. i saw few plugins but i want to write it myself. Thanks
×
×
  • Create New...