Jump to content

Blaster

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Blaster

  1. I am just want to implement yii users module to work together with PW. Just simple as that. It's like a shortcut for me. Don't know if it is a right decision or not.
  2. I just try to include Yii to my blank template named blast.php <?php include("./mb/index.php"); my yii are inside /site/templates/mb/ Just Got this error : Error: Exception: Unable to resolve the request "blast/index". (in D:\wamp\www\blaster\site\templates\mb\framework\web\CWebApplication.php line 286) #0 D:\wamp\www\blaster\site\templates\mb\framework\web\CWebApplication.php(141): CWebApplication->runController('blast/index') #1 D:\wamp\www\blaster\site\templates\mb\framework\base\CApplication.php(180): CWebApplication->processRequest() #2 D:\wamp\www\blaster\site\templates\mb\index.php(35): CApplication->run() #3 D:\wamp\www\blaster\site\templates\blast.php(2): include('D:\wamp\www\bla...') #4 D:\wamp\www\blaster\wire\core\TemplateFile.php(125): require('D:\wamp\www\bla...') #5 [internal function]: TemplateFile->___render() #6 D:\wamp\www\blaster\wire\core\Wire.php(271): call_user_func_array(Array, Array) #7 D:\wamp\www\blaster\wire\core\Wire.php(229): Wire->runHooks('render', Array) #8 D:\wamp\www\blaster\wire\modules\PageRender.module(250): Wire->__call('render', Array) #9 D:\wamp\www\blaster\wire\modules\PageRender.module(250): TemplateFile->render() #10 [intern Haven't found the solution yet... maybe some people who already trying can shed the light to me... {I am newbies in both yii and processwire }
  3. Newbies on the jungle of code brackets!

  4. Newbies on the jungle on code bracket!

  5. Fortunately... After reading and searching article on this site. This is working code. function bootwireCarousel(){ // We will need to treat the first image separately $slides = wire("pages")->get("/slideshow/")->children('template=slidefeat, limit=3,sort=-date, include=hidden'); $firstImage = wire("pages")->get("/slideshow/")->child; $out =" "; // The indicators $out .="<ol class='carousel-indicators'>"; // the carousel indicators need to start at 0 $count = -1; foreach($slides as $slide) { $activeClass = ($slide === $firstImage ? 'active' : ''); $count++; $out .="<li data-target='#myCarousel' data-slide-to='{$count}' class='{$activeClass}'></li>"; } $out .="</ol>"; // Carousel Items $out .="<div class='carousel-inner'>"; foreach($slides as $slide) { $activeClass = ($slide === $firstImage ? 'active' : ''); $out .="<div class='{$activeClass} item'>"; $out .="<img src='{$slide->images->url}{$slide->images}' />"; $out .="<div class='container'>"; $out .="<div class='carousel-caption'><h1>{$slide->title}</h1><p class='lead'>{$slide->body}</p></div>"; $out .="</div>"; // /container $out .="</div>"; } $out .="</div>"; // /carousel inner // Carousel optional nav - you can remove these if you dont want the side arrows $out .="<a class='carousel-control left' href='#myCarousel' data-slide='prev'>‹</a>"; $out .="<a class='carousel-control right' href='#myCarousel' data-slide='next'>›</a>"; if($firstImage) { echo "<section id='myCarousel' class='carousel slide'>{$out}</section>"; } } Thanks for you all...
  6. Thanks for the reply hani, unfortunately the site is still on my pc localhost. Will let all know when the code work out.
  7. Thanks for reply Hanni, Yeah i am new to PW, right now still struggling to get pages slides... you can see full code https://github.com/jsanglier/bootwire/blob/master/templates/includes/functions.inc this is my version but right now it doesnt show and no error shown. function bootwireCarousel(){ // We will need to treat the first image separately $slides = wire("pages")->find("parent=/slideshow/, template=slidefeat, limit=3, sort=-date"); $firstImage = $slides->first(); $out =" "; // The indicators $out .="<ol class='carousel-indicators'>"; // the carousel indicators need to start at 0 $count = -1; foreach($slides as $slide) { $activeClass = ($slide === $firstImage ? 'active' : ''); $count++; $out .="<li data-target='#myCarousel' data-slide-to='{$count}' class='{$activeClass}'></li>"; } $out .="</ol>"; // Carousel Items $out .="<div class='carousel-inner'>"; foreach($slides as $slide) { $activeClass = ($slide === $firstImage ? 'active' : ''); $out .="<div class='{$activeClass} item'>"; $out .="<img src='{$slide->images->url}' />"; $out .="<div class='container'>"; $out .="<div class='carousel-caption'><h1>{$slide->title}</h1><p class='lead'>{$slide->body}</p></div>"; $out .="</div>"; // /container $out .="</div>"; } $out .="</div>"; // /carousel inner // Carousel optional nav - you can remove these if you dont want the side arrows $out .="<a class='carousel-control left' href='#myCarousel' data-slide='prev'>‹</a>"; $out .="<a class='carousel-control right' href='#myCarousel' data-slide='next'>›</a>"; if($firstImage) { echo "<section id='myCarousel' class='carousel slide'>{$out}</section>"; } }
  8. Hi all, inside includes/function.inc bootwireCarousel() $slides = wire("page")->images; Changed with $slides = wire("pages")->get("parent=/slideshow/, template=slidefeat, limit=3, sort=-date")->images; My problem is, the carousel only show image from my first child page. I got no idea how to fix this... Thanks for nice theme anyway.
×
×
  • Create New...