Jump to content

Phil

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Interests
    UX, Interface Design, Serendipty and Capoeira

Phil's Achievements

Newbie

Newbie (2/6)

0

Reputation

1

Community Answers

  1. Nico, it may really be an issue with js. The only (apparently) broken code is displayed in the console. "Show Source Code" reveals that all data is at least delivered to the right places. So I guess I'll have to examine the js. Thanks a lot guys! --- Edit: It was something entirly different: UTF-8 coding instead of UTF-8 w/o BOM. Using Chrome (and its console) revealed some (invisble) code, that scrambled the header. Firebug didn't show it. Thank you guys again, I learned a lot about Processwire on the way. Cheers, Phil
  2. The self-closing img-tag did not help either. At least your hint on the structure of the image-field-set helps a lot!
  3. Good morning gebeer, thank you for your help. I just fixed the missing echo in _main.php, it is not the reason. So here is one of the misbehaving templates. Still quite minimal. <?php //headline $content = '<article><div class="grid-50 tablet-grid-66 mobile-grid-100 suffix-50 tablet-suffix-33"><h1>'.$title.'</h1>'; //picture if available if ($page->pictures) { $content.='<figure><img class="artikelbild" src="'.$page->pictures->url.'" alt=""></img></figure>'; } //add text and close tags $content.= $page->body; $content.='</div></article>';
  4. This is my main.php, some comments for orientation added: <?php ?><!DOCTYPE html> <html lang="de"> <head> <!--the next 6 lines of code get moved into the body--> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?php echo $title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/style-para.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/unsemantic-grid-responsive-tablet-no-ie7.css" /> <script src="<?php echo $config->urls->templates?>scripts/modernizr.js"></script> </head> <!--two wrapping divs for off-canvas navigation--> <body> <div id="outer-wrap"> <div id="inner-wrap"> <div class="grid-container"> <!--header is link to home off-canvas navigation--> <header id="header" role="banner"> <div> <h1 class="title-banner">Design Philipp Ahrendt</h1> <a class="nav-btn" id="nav-open-btn" href="<?php $homepage->url ?>">Menü</a> </div> </header> <nav id="nav" role="navigation"> <div> <ul> <h2 class="title-banner">Menü</h2> <?php // top navigation consists of visible children of homepage foreach(($homepage->children) as $item) { if($item->id == $page->rootParent->id) { echo "<li class='is-active'>"; } else { echo "<li>"; } echo "<a href='$item->url'>$item->title</a></li>"; } // output an "Edit" link if this page happens to be editable by the current user if($page->editable()) echo "<li class='edit'><a href='$page->editUrl'>Edit</a></li>"; ?> </ul> <a class="close-btn" id="nav-close-btn" href="#top">Close</a> </div> </nav> </div> <div class="grid-container" id="main"> <!--main content--> <main> <?php echo $content; ?> </main> </div> <!-- footer --> <div class="grid-container" id="footer"> <footer id="footer"> <p> Here be footer! </p> </footer> </div> </div> </div> <!--script for off-canvas navigation--> <script src="<?php echo $config->urls->templates?>scripts/main.js"></script> </body> </html> I started with the code from the tutorials and the provided examples. As I already mentioned the homepage is free of the glitch. Could it possibly be connected to the "Content Type" at the "Files"-Tab of an template? I switched it back to default/empty but tried some other values out of curiosity.
  5. Hi, another processwire-beginner here. I am recently building my first website and got myself a strange error: On all pages but the homepage the code from within the head-tags of the delivered html-file gets transfered into the body. It looks like this (stripped of most html in <body>) <html class=" js no-touch csstransforms csstransforms3d csstransitions svg js-ready" lang="de"> <head></head> <body> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <meta content="width=device-width, initial-scale=1" name="viewport"> <title>Webbaukästen</title> <meta content="" name="description"> <link href="/site/templates/styles/style-para.css" type="text/css" rel="stylesheet"> <link href="/site/templates/styles/unsemantic-grid-responsive-tablet-no-ie7.css" type="text/css" rel="stylesheet"> <script src="/site/templates/scripts/modernizr.js"> <div id="outer-wrap"> <script src="/site/templates/scripts/main.js"> </body> </html> The templates consist of an _init.php to define the variables, the template to fill the variables and a main.php with the basic structure just like in the tutorials. The head-tags are defined in the main.php. So somewhere they get scrambled while the page is calculated and delivered from the CMS. Does anybody have an idea where I may have made an mistake? Thanks, Phil
×
×
  • Create New...