Jump to content

PhotoWebMax

Members
  • Posts

    246
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by PhotoWebMax

  1. Looks like I am totally stalled on this quest. I have tried messing around with this but cannot get the effect I am looking for to work. The # fragment identifier does not work. The site and the post system works fine though...
  2. I have gotten this far. This is the full code for the articles container page template: <?php include('./_head.php'); // include header markup ?> <div id='content'> <?php // output 'headline' if available, otherwise 'title' echo "<h1>" . $page->get('headline|title') . "</h1>"; ?> <div id="articlesContainer"> <h2>Articles & More</h2> <?php $articlesItems = $pages->find("template=articles"); foreach($articlesItems as $articlesItem) { ?> <div class="articlePost"> <h3 id="<?php echo $articlesItem->id; ?>"><?php echo $articlesItem->title; ?></h3> <?php echo $articlesItem->article_maintext; ?> </div><!--articlePost ends--> <?php } ?> </div><!--articlesContainer ends--> <div id="lowerContent"> <div id="leftWidget"> <?php include('./leftWidgetContent.inc'); ?> </div><!--leftWidget ends--> <div id="rightWidget"> <h3>Articles & More</h3> <?php $teaserLinks = $pages->find("template=articles"); foreach($teaserLinks as $teaserLink) { ?> <h3><?php echo $articlesItem->title; ?></h3> <p><?php echo $articlesItem->article_introtext; ?></p> <?php echo "<a href='" . $pages->get("/SREPversion2/posts/")->url . '#' . $teaserLink->id . "'>Continue Reading</a>"; } ?> </div><!--rightWidget ends--> </div><!--lowerContent ends--> </div><!--end content--> <?php include('./_foot.php'); // include footer markup ?> The teaser section with article title and teaser intro text appears on all the site pages (contained inside the rightWidget div). I am using a hidden container page called "Posts" to contain the actual articles. The articles page url is generated to show as: localhost:8888/SREPversion2/posts/articletitle This page will then display all the article spots in full (with title and full main text). But so far: clicking on any of the teaser links in the teaser section (on any site page) will take you to the top of the articles post page. IE: clicking the fourth teaser link will take you to the top of the main articles page instead of scrolling down to the fourth article post. I will mess around with this some more. I think this code is very close... Max Edit: I think what is not being generated is the vital # hashtag in the url? In looking this over I am wondering if using the same template name for the articles container page and the rightWidget teaser system div is not the thing to do? Should I split this into two templates with unique names? I checked the generated markup via the w3c valuator and it passed as solid HTML5. So the issue must be in the hashtag logic?
  3. I did some quick testing with SiNNuT's suggestion and quickly ran into trouble... I tried adding the /#location1. etc to the article titles but that will not do as the /#location1 gets added to the title name. it looks bad on the front articles teaser section for a start. I need this to happen dynamically. So I assume I need to add this to the articles container page template. Here is the relevant code: <div id="articlesContainer"> <h2>Articles & More</h2> <?php $articlesItems = $pages->find("template=articles"); foreach($articlesItems as $articlesItem) { ?> <div class="articlePost""> <h3><?php echo $articlesItem->title; ?></h3> <?php echo $articlesItem->article_maintext; ?> </div><!--articlePost ends--> <?php } ?> </div><!--articlesContainer ends--> The fragment identifier code will need to be added to the h3 headline in this case. Do I also need to add a new field that allows me to add the location#? Thanks!
  4. Thanks Guys. I will take a look at both and see where I am at. Now that I know the term for the affect (fragment identifier) it should be easier to do some digging. There are several ways of coding and presenting teased post content. In this case I thought this effect might be worth looking into. One of the issues might be how Google handles the content on this page... This is worth reading: http://blog.httpwatch.com/2011/03/01/6-things-you-should-know-about-fragment-urls/
  5. Hi All, I am not sure if this is PW task or not, but here goes... On one of the site PW sites I am working on I have a lower "articles teaser" section added to my template. In this section I am using the PW foreach API system to display each article's title, short intro paragraph and a "continue reading" link. I plan on only having about four or so articles that use this articles teaser section. All of the "continue reading" links takes the viewer to the same single articles container post page where each article is displayed in its full length, one article after another. I find this reduces clicking from page to page, etc. What I would like to add is a system that takes the reader directly to the specific article they clicked on? So, if the dear reader clicked on the third article in the front "articles teaser" section they would be shown the third article on the actual articles container page: as if they had physically scrolled down the page themselves. From there the reader can simply scroll up or down this page to read the remaining articles. My hunch is that there might be a jQuery solution for this? I have never done this before. I am looking for tips on how to combine some kind of script to the PW foreach statement I am using. Or is there a direct PW solution to this that does not require a script? Thanks! Max
  6. Great discussion people... This is never a "one size fits all" arena. I still think the most important aspects of client relationships is bringing solid communication and enthusiasm to the table. Some web guys enjoy studying and deploying multiple systems. The question then becomes "do you need to act like a heavy Swiss Army Knife when a single sharp blade will do?" The lines between designer and developer can get quite blurry. Having both skills in solid quantities is a blessed thing for sure. I am not one of those guys. Still, I think it is better to have design, color, typography, CSS, usability and written/verbal skills than it is being a master of several complicated systems. A studio can offer clients more options due to the advantage of greater staff experience and skill levels. But what about the one man band? There is no harm in saying "I have spent a lot of time investigating all the Droomlapressengine options and have decided that Processwire is the best fit for me. Therefore if we work together it is also the best fit for you..."
  7. I find it interesting how often I see MODX mentioned here on the Processwire forum. Does anyone have any idea of how many MODXers there are here at Processwire now? I think I did about 15 or so MODX sites and was really into it for a number of years. What jaded me was the confusion over the MODX project overall. It sort became confusing to handle the EVO & REVO and on again - off again cloud thing. It also seems like the under development MODX 3 branch is hurting the much needed update path energy for REVO. Not to mention all the core staff changes. Anyway you slice it losing Shaun McCormick was a watershed moment for MODX. Much of what he developed seems to be withering on the vine. In a way I am sort of sad with the growing pains MODX is experiencing lately. There were/are so many great people involved with the project. Like Processwire MODX has a great community. Very glad to be here though...
  8. Great stuff Joss! You have a great way of writing fun, insightful tutorials that strike a solid balance between not assuming too much from the reader while avoiding brief geekspeak... EDIT: just noticed my liking your post is your 2000th "Like"... Well done...
  9. Thanks Everfreecreative, That is good to know. For the moment I am using the nth-child(even) selector to do different things. I have not built sites in quite some time but I am back in the swim of things now: several site projects on the go. Coding markup, CSS, Php (the tiny amount I know) and all things ProcessWire is really fun again. The more I play with PW the more I like it...
  10. Craig, Thanks! Very powerful: opens up all kinds of styling possibilities...
  11. Another newby question if I may? Say I have a news posting system using the following: <?php $newsItems = $pages->find("template=widgetNews"); foreach($newsItems as $newsItem) { ?> <h3><?php echo $newsItem->title; ?></h3> <h4><?php echo $newsItem->newsDate; ?></h4> <?php echo $newsItem->newsSummary; ?> <?php } ?> What is the best way of attaching some CSS class styling to each post as a whole? Thanks!
  12. One of the things that bugs me about Wordpress is the template system: its complicated. Sure there are a zillion themes and plugins that make the system work, but deviating to any kind of custom layout opens up a can of worms as you will need to fight the underlying WP scaffolding. After trying several of the popular platforms I settled on MODx due to the open design process and template freedom. Processwire takes this freedom even further as there is less propriety system syntax. Its cleaner and more elegant. There are a lot of ProcessWire folks here who came from the front end world, knowing markup, css, adding scripts etc; but not really knowing how to code PHP. Even though I am an on again - off again beginner I now realize you do NOT need to know everything about PHP. There are the basic functions that get mixed with minimal Processwire syntax. That becomes the core dynamic elements to your custom template. These then mix with all the different Fields that makes your dynamic content come alive. Its very powerful. Not knowing PHP does increase your time investment though. Debugging issues becomes longer as the obvious errors in your work are just not so obvious. That is where this great community comes in... Good luck!
  13. No, I had not seen that. Very interesting option! I am currently working on three (soon to be four) PW sites so will keep this in mind... Thanks!
  14. Back again... Did some more work just now and everything clicks into place! I now have a two column section that pulls in News & Events pages from two hidden parent pages. Still have some CSS work to do but it works great. Also got a dynamic gallery system with pagination, jQuery eye-candy and custom CSS working. Real progress. Thanks to all! Max Next up: learn how to create a custom private page that only vetted site volunteers can access...
  15. thistimj, Thanks so much! I am getting closer. You are correct. My child pages under News were unpublished. I changed this. I have two entries. Only one displays right now, but this is a major step in the right direction. I have family over waiting for a late dinner. Will get back to this in the morning... Cheers, Max
  16. Updated code in my Home page template: ... </div><!-- end sidebar --> <div id="lowerWidgets"> <div id="widgetNews"> <h3>News...</h3> <?php $newsItems = $pages->find("template=widgetNews"); foreach($newsItems as $newsItem) { ?> <h4><?php echo $newsItem->title; ?></h4> <h4><?php echo $newsItem->newsDate; ?></h4> <p><?php echo $newsItem->newsSummary; ?></p> <?php } ?> </div><!--widgetNews ends--> <div id="widgetUpcomingEvents"> <h3>Upcoming Events...</h3> </div><!--widgetUpcomingEvents ends--> </div><!-- lowerWidgets ends -->... My output is this: </div><!-- end sidebar --> <div id="lowerWidgets"> <div id="widgetNews"> <h3>News...</h3> </div><!--widgetNews ends--> <div id="widgetUpcomingEvents"> <h3>Upcoming Events...</h3> </div><!--widgetUpcomingEvents ends--> </div><!-- lowerWidgets ends --> So, the <h4> and <p> content I am looking of is not being generated... Edit**: here is my code for the widgetNews template for the News posts... <div class="widgetNews"> <h4><?php echo $page->title; ?></h4> <h4><?php echo $page->newsDate; ?></h4> <p><?php echo $page->newsSummary; ?></p> </div><!--widgetNews ends--> OK, Now that I post this I see have a div ID and Class name with the same names! This might be the issue? Edit**: I changed the ID to News from widgetNews but the hoped for content is still not showing. Feeling closer though?
  17. No, nothing major... I checked the w3c validator and the only errors are 5 missing image alt attributes...
  18. Hmmm, Nothing shows up in the News block? I have this: ... </div><!-- end sidebar --> <div id="lowerWidgets"> <div id="widgetNews"> <h3>News...</h3> <?php $newsItems = $pages->find("template=widgetNews"); foreach($newsItems as $newsItem) { ?> <h4><?php echo $newsItem->newsTitle; ?></h4> <h4><?php echo $newsItem->newsDate; ?></h4> <p><?php echo $newsItem->newsSummary; ?></p> <?php } ?> </div><!--widgetNews ends--> <div id="widgetUpcomingEvents"> <h3>Upcoming Events...</h3> </div><!--widgetUpcomingEvents ends--> </div><!-- lowerWidgets ends --> <?php include('./_foot.php'); // include footer markup ?> Is that <?php near the end of the foreach statement supposed to be there? If I remove it I get a parse error in line 112? But the final line of my template is actually line 110. Line 112 is empty? Thanks!
  19. My head is bleeding... I removed what I had and created two hidden parent pages for the News and Events and added a custom template and the three fields to each. So far that seems good. The News and Events child pages do not appear in the main site navigation (intended) but I can view them live from the admin. But I am a million miles from getting the code right in the section of my Home page where I want the content for the News and Events to appear? I thought I could use the $pages->find( ) selector to grab the two templates and then follow that with a foreach statement to get them to aggregate on the Home page. I have messed with this for some time but I either get nothing to show or a parse error. This is where I am at currently (demonstrating my ignorant newbyness in all its glory): <div id="lowerWidgets"> <div id="widgetNews"> <h3>News...</h3> <?php $pages->find("template=widgetNews") foreach ($page->children as $newsChild):?> <h4><?php=$newsChild-> $page->newsTitle; ?></h4> <h4><?php=$newsChild-> $page->newsDate; ?></h4> <p><?php=$newsChild-> $page->newsSummary; ?></p> ?> </div><!--widgetNews ends--> ...
  20. Thanks Joss, I am guessing I need to add a category system as well so that the news items get listed in the News block and the events items get listed in the Upcoming Events block?
  21. I have had a long absence from PW and seem to have forgotten how to do some things... I have a site I am working on with a successful Home page and working template, etc. At the bottom of the this page I would like to have a two column block that shows News and Upcoming Events items. These are not nav links but rather blocks that show the actual title, date and text copy for each item. I started with the following in my Home page template: <div id="lowerWidgets"> <div class="widgetNews"> <h3>News...</h3> <h4><?php echo $page->newsTitle; ?></h4> <h4><?php echo $page->newsDate; ?></h4> <p><?php echo $page->newsSummary; ?></p> </div><!--widgetNews ends--> ... I have the CSS and the Fields working nicely. What I want to do now is to be able to add more than one News item to the News block. I want this to be as simple and direct for the site owner as possible. What is the best way of doing this, being able to repeat entering the Fields for widgetNews? I have another site I am working on where I have something similar happening. What I did there is create child pages for each entry and then use a foreach statement in the template to aggregate the list of generated content blocks on one page. But before I go any further here I want to make sure that I am not missing a simple way of doing this that would be easy for a non techy site owner to manage? Thanks Max
  22. I was using 2.4 previously. The new version looks more polished and I prefer the CKEditor. My first upgrade and it was super easy. Generally speaking though: the biggest improvement is with the PW documentation. It looks like it is catching up with the actual development of the system...
  23. Hi All, I have been away for several months I guess. Just too much stuff going on. A couple of my MODx sites have just been hacked. So, my learning of all things Processwire now takes on a new urgency. I have four or more sites to convert to PW as soon as I am able. The timing is not perfect but plunging into the deep end is probably a good thing. Anyway, I just wanted to say how impressed I am with all the new effort I see on the PW site: new tuts, new profiles, new cool version of of the application and lots of new documentation & forum chatter... Cheers, Max
  24. Good point. I changed the thread title...
  25. Hi All, I have been away from PW for a few months. Busy with life etc... I have a couple of important MODx sites that are displaying the dreaded Malware warning: "visiting this site may harm your computer"... My intension was to switch these sites (one Evo and one Revo) to PW at some point. The timing is not great right now. So, what to do? How hard is it to restore the MODx sites so the Malware warning goes away? Or should I just start fresh and rebuild the sites using PW? Just accessing all the pages to copy the content will be all kinds of fun I am sure. Looking for suggestions please... Thanks! Max
×
×
  • Create New...