Jump to content

Troost

Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by Troost

  1. Thanks MoritzLost for your response! Home: <?php include("./header.php"); ?> <?php include("./projectoverzicht.php"); ?> <?php include("./footer.php"); ?> Projectoverzicht: <div id="gtco-project"> <div class="container"> <div class="row row-pb-md"> <div class="col-md-7"> <h3><?php echo $page->introtitel; ?></h3> <p class="desc"><?php echo $page->introtext; ?></p> </div> </div> <div class="row row-pb-md"> <div class="col-md-4 col-sm-4 col-xs-6 fh5co-project animate-box"> <a href="#"><img src="<?php echo $page->projectthumb; ?>" class="img-responsive"> <h3>Fancy 3D Letter Effect</h3> </a> </div> <div class="col-md-4 col-sm-4 col-xs-6 fh5co-project animate-box"> <a href="#"><img src="<?php echo $page->projectthumb; ?>" class="img-responsive"> <h3>Hard Cover A5 Format</h3> </a> </div> <div class="col-md-4 col-sm-4 col-xs-6 fh5co-project animate-box"> <a href="#"><img src="<?php echo $page->projectthumb; ?>" class="img-responsive"> <h3>Notepad Mockup</h3> </a> </div> </div> </div> I tried to place your code in my projectoverzicht.php but it still won't echo anything out <div id="gtco-project"> <div class="container"> <div class="row row-pb-md"> <div class="col-md-7"> <h3><?php echo $page->introtitel; ?></h3> <p class="desc"><?php echo $page->introtext; ?></p> </div> </div> <div class="row row-pb-md"> <?php $project_index = $pages->get(43); $projects = $project_index->children("template=projectdetail"); echo '<div class="col-md-4 col-sm-4 col-xs-6 fh5co-project animate-box">'; foreach ($projects as $project) { echo '<a href="' . $project->url() . '">'; echo '<img src="' . $project->projectthumb->url() . '" alt="' . $project->projectthumb->description() . '" >'; echo '<h3>$project->title</h3>'; echo '</a>'; } echo '</div>'; ?> </div> </div> </div> /* EDIT */ Oke, i'm getting some where with this! Only, as u can see, it won't echo out the H3 <div id="gtco-project"> <div class="container"> <div class="row row-pb-md"> <div class="col-md-7"> <h3><?php echo $page->introtitel; ?></h3> <p class="desc"><?php echo $page->introtext; ?></p> </div> </div> <div class="row row-pb-md"> <?php $project_index = $pages->get(1015); $projects = $project_index->children("template=projectdetail"); foreach ($projects as $project) { echo '<div class="col-md-4 col-sm-4 col-xs-6 fh5co-project animate-box">'; echo '<a href="' . $project->url() . '">'; echo '<img src="' . $project->projectthumb->url() . '" alt="' . $project->projectthumb->description() . '" class="img-responsive" >'; echo '<h3>$project->title</h3>'; echo '</a>'; echo '</div>'; } ?> </div> </div> </div>
  2. Hiya all, My structure is: Home > Projects > Project 1... And my goal is to echo the image thumbnail fields from Project 1, Project 2, Project 3 etc, on the homepage (called 'Portfolio site' in the attach). Can someone explain me the way to hook these fields to the homepage? I can't figure it out myself with the cheatsheet and my current skill level. Thanks in advance! Cheers, Hugo
  3. Hiya FBG, thanks for responsding. It was just a 'checkbox' view for guests which I had put off without noticing
  4. Hiya Mats, Thanks for responding... Pffffff, what a dumb mistake by me. The field itself was not visable by guests... Now it works again... wheheheheh Thanks for your time anyway!
  5. Its by the way just the pages with images. The text pages work for the guests.
  6. Thanks for your reaction, Yeah, thats a thing for myself. I need to add the description from fields underneath the lightbox image, but I can't get that fixed either :p. So I commented it out for myself to play a bit with... I looked at the console and commented that out, now the error is gone.
  7. Hiya, I'd searched the forums but only found answers for multilingual sites. This is a non multilingual site. I'm currently busy with a website but i't wont show the images like it does over here. (Only when I'm logged in as admin). I looked at the roles of the Guest, and it seems that everything is ok. Thanks in advance. [SOLVED] The field itself wasn't set to view for guests
  8. Thanks @Horst for your comment. I'd replaced it! And @Blynx helped me trough PM. (Thanks!!) With the following line of code $projects = $pages->get("name=projects"); foreach ($projects->children as $cat) { foreach ($cat->children as $proj) { if ($proj->head_image) { echo $proj->head_image->url."<br>"; } } }
  9. Ohhww, why wouldnt it work here? Ehm yes, i checked it, each projectpage has an actual image inside head_image.
  10. Yea, I have sorted the templates. The projects under Photography are with the photography.php, same for graphic etc etc. I will sort it out later with. If clicked on photography, the rest of the images wil disappear, and same for other categories. The category doenst have a head image, its just the projects underneath. The category just just a 'empty' template with only the title displayed. The code ill posted above is from the category template, the template structure is build up like this root -> Projects (category template) -> Photography, Graphic etc (category template) -> project (project template) This is the category page This is the projectpage (The image description and images are for an eventualy further page) --------------- Now I get an syntax error with this <?php if($page->numChildren) { echo "<ul class='project'>"; foreach($page->children as $cat) { foreach ($cat->children as $project) { if ($project->head_image) { echo "<li class='item'><img src='{$project->head_image->url}' class='image'></li>"; }} echo "</ul>";} ?> But the syntax error gives an error at the end of the document... When I put the other lines of code back to how it was, the error is gone. Thanks for your time, I hope im not confusing with the long sloppy posts
  11. Nope, still won't work :(. (Thanks for your time) It's just an image feed which is shown on the website so a specific class isn't necessary I think?! <?php if($page->numChildren) { echo "<ul class='project'>"; foreach($page->children as $cat) { foreach ($cat->children as $project) { if ($project->head_image) { echo "<li class='item'><img src='{$project->head_image->url}' class='image'></li>"; }} echo "</ul>";} ?>
  12. Hi Steffen, Thanks for your comment and help. I've copied your code in, but still won't echo all the projects from the different categories. Got it like this now, or is this to easy thinking? <?php include("./header.inc"); ?> <div id="container" data-isotope='{ "itemSelector": ".grid-item", "layoutMode": "fitRows" }'> <div class="grid-sizer"></div> <?php if($page->numChildren) { echo "<ul class='project'>"; foreach($page->children as $cat) { foreach ($cat->children as $project) { if ($project->head_image) { echo "<li class='item' ><img src='{$project->url}' class='image'></li>"; }} echo "</ul>";} ?> </div> <!-- END CONTAINER --> </body> <?php include("./footer.inc"); ?>
  13. Hiya, I'm working on a simple portfolio theme but I've got stuck. Here's the thing... I have: Site root Projects Category 1 Project 1 Project 2 Category 2 Project 1 Project 2 Category 3 Project 1 Project 2 Contact Each projectpage has an imagefield (head_image) which has to be shown on the main page. But the page 'Projects' only shows the project images of the first category 'Category 1' (So only the first child page of projects). I want them to show all projects from all the category's. How can I fix this? I'm using this code now <?php include("./header.inc"); ?> <div id="container" data-isotope='{ "itemSelector": ".grid-item", "layoutMode": "fitRows" }'> <div class="grid-sizer"></div> <?php if($page->numChildren) { echo "<ul class='project'>"; foreach($page->children->child as $child) { if ($child->head_image) { $image = $child->head_image; echo "<li class='item' ><img src='{$image->url}' class='image'></li>"; }} echo "</ul>";} ?> </div> <!-- END CONTAINER --> </body> <?php include("./footer.inc"); ?> Thanks in advance!
  14. Hi Fester, If I understand your question, you can unpublish the page by going to the page you want to hide -> settings -> check unpublished. (The admin and editor can see it trough pressing the view button in the tabs) If this ain't what youre looking for I am sorry, my PHP skills don't reach so far. Cheers
  15. Cool, thanks for sharing!
  16. A very simple portfolio site for photographers, designers, textwriters. When its infished Ill upload the source to share with ya'll.
  17. Cool module, thanks! I am currently creating an easy portfolio for creatives based on PW. With this function I can share it easily with friends to customize their own. When It's finished Ill share it over here.
  18. Haha, I already tought that would make more sense, nice! I'm new in this, so its a shreducation Thanks all for helping me out!
  19. I dont know how it happend, but it happend. A colleague of mine told me to place this at the top of the header.inc page New header.inc <?php $header=$pages->get('1012'); ?> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> <!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]--> <!-- Consider adding an manifest.appcache: h5bp.com/d/Offline --> <!--[if gt IE 9]><!--> <html class="no-js" lang="en" itemscope itemtype="http://schema.org/Product"> <!--<![endif]--> <head> <meta charset="utf-8"> <!-- Use the .htaccess and remove these lines to avoid edge case issues. More info: h5bp.com/b/378 --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title><?php echo $page->title; ?></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <!-- We highly recommend you use SASS and write your custom styles in sass/_custom.scss. However, there is a blank style.css in the css directory should you prefer --> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/gumby.css" /> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/style.css" /> <script src="<?php echo $config->urls->templates?>js/libs/modernizr-2.6.2.min.js" /></script> </head> <body> <div id="wrapper"> <div class="row social"> <div class="two columns socialmedia"> <?php echo $header->social_icons; ?> </div> </div> <div class="row top"> <div class="balk"></div> <div class="three columns logo"><?php echo $header->logo; ?> </div> <div class="nine columns navigation"> <ul class="main-nav"> <?php $root = $pages->get("/"); $children = $root->children; $children->prepend($root); foreach($children as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } ?> </ul> </div> <!-- END NAVIGATION --> </div> <div class="row header"> <div class="twelve columns header-image"><img src="<?php echo $header->header->eq(0)->getThumb('thumbnail');?>" /> </div> </div><!-- END HEADER --> </div><!-- END TOP --> <div class="clear"></div> He said it was because the home.php was including the header.inc, but the variables were loading pages instead of $head or something like that. Its hard to explain in english. Hope you guys will understand it with this code above.
  20. The problem is solved, a collegue helped me out. I had to add <php $header=$pages->get('pagenumber'); ?> on top of the header.inc The same goes for the footer. Thanks al for your help and time! I really appreciate it.
  21. Yes, the rest of the page gets output from the filled fields. When I comment those out, the whole site won't show up.
  22. Hmm, this also won't work... Thanks for your time
  23. This is the error.txt 2015-02-08 13:28:41 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 5 of /Applications/MAMP/htdocs/pw/site/templates/home.php) 2015-02-08 13:29:05 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 5 of /Applications/MAMP/htdocs/pw/site/templates/home.php) 2015-02-08 14:20:41 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' (line 34 of /Applications/MAMP/htdocs/pw/site/templates/header.php) 2015-02-08 14:26:16 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '.' (line 39 of /Applications/MAMP/htdocs/pw/site/templates/header.php) 2015-02-08 14:26:23 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) (line 39 of /Applications/MAMP/htdocs/pw/site/templates/header.php) 2015-02-08 14:26:24 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) (line 39 of /Applications/MAMP/htdocs/pw/site/templates/header.php) 2015-02-08 14:28:58 admin http://localhost:8888/pw/ Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 62537728 bytes) (line 54 of /Applications/MAMP/htdocs/pw/site/templates/header.php) 2015-02-08 14:29:39 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 3 of /Applications/MAMP/htdocs/pw/site/templates/home.php) 2015-02-08 14:29:39 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 3 of /Applications/MAMP/htdocs/pw/site/templates/home.php) 2015-02-08 14:29:42 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 3 of /Applications/MAMP/htdocs/pw/site/templates/home.php) 2015-02-08 14:56:02 admin http://localhost:8888/pw/ Parse Error: syntax error, unexpected '<' (line 2 of /Applications/MAMP/htdocs/pw/site/templates/header.inc) 2015-02-08 14:56:58 admin http://localhost:8888/pw/photos/ Parse Error: syntax error, unexpected ')' (line 43 of /Applications/MAMP/htdocs/pw/site/templates/header.inc)
  24. Yes, they are in the same folder, and I just tried, still no response. Thanks btw for the fast comments you guys
  25. Yes, I uploaded a logo, and also tried to put some text, still no response.
×
×
  • Create New...