Jump to content

Peter Knight

Members
  • Posts

    1,384
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Peter Knight

  1. Solved with the help of Tom's question in 2012 I adapted it slightly to <?php if ($page->prev->id) { $prevThumb = $page->prev()->Images->first()->getCrop('articlesquare'); echo " <h3>Previous Article</h3> <figure class='uk-overlay'> <img src='{$prevThumb->url}' /> <div class='uk-overlay-panel uk-overlay-chevron-left'></div> </figure> <a href='{$page->prev->url}'>{$page->prev->title}</a> ";} ?>
  2. Hi I have a series of child pages with Next and Back thumbnails under each page. Parent - Child 1 - Child 2 - Child 3 - Child 4 I want Child page 1 to know it's the first page and not try to render a thumbnail. Likewise, I want Child page 4 to know it's the last page etc... My code works when I am not trying to call a thumbnail but as soon as I try to check for the existence of a previous or next page, my check fails. <figure class="uk-overlay"> <?php //get the cropped thumbnail from the previous page $image = $page->prev->Images->first()->getCrop('articlesquare'); // if there is a previous page, show a thumbnail if($page->prev){ echo "<img src='{$image->url}' alt='{$image->description}' class='art-prev' />"; } else { echo "";} ?> <div class="uk-overlay-panel uk-overlay-chevron-left"></div> </figure> <a class="<?=$page->prev->id ? 'previous' : 'no-before'?>" href="<?php echo $page->prev->path; ?>"><?=$page->prev->title?></a> Should I in fact be approaching this differently as the page is first looking for the existence of a cropped thumbnail?
  3. Nice idea. I was looking into something similar today.
  4. There aren't enough Like buttons for this!
  5. Peter Knight

    404 Hits

    isn't the default url domain.com/wp-admin.php In PW I can only setup page urls like this domain.com/wp-admin/
  6. @benbyford I got a little lost in the Docs and found them hard to follow. Eventually I reverted to a Plesk extension which did the hard work for me. Which part are you stuck on? I found that the default PW .htaccess was preventing the installation of the extension and had to temporarily rename it.
  7. I have HootSuite running for social media management. One thing I like to do is have separate streams running for various CMS I have an interest in. This means I can quickly see all posts mentioning CMS A, CMS B, CMS C etc in a dedicated stream. Makes it easy to follow community topics and product developments etc. But it also makes it easy to gauge social media chatter in relation to a CMS. One thing I've always noticed is how few mentions and tweets PW gets compared to other CMS. IMHO we have a very active and enthusiastic community (as evident from the forums) but a relatively quiet community when it comes to Twitter and Facebook. I'm guilty of this myself but the same thing occurs to me every time I see those three social media streams lined up side by side. Why is it that users of CMS B and CMS A are so vocal on twitter, google plus etc and quick to promote their CMS when PW gets a mention or re-tweet only every second of third day? Incidentally, the 2 other CMS I follow are not huge platforms where you'd naturally expect thousands of tweets a day in comparison to ProcessWire. Anyway, the above occurred to me again after reading Ryan's roadmap post where there was specific mention of This was followed by mention of : curiously there was no mention of social media. Is there an unintentional prejudice against Twitter, GooglePlus and Facebook etc that we're not aware of? Ok, it's an odd question but I thought it'd be worth a check. ProcessWire is growing in userbase, the forums are attracting new members weekly, the CMS itself is a work of art, we have wonderful blog updates on a weekly basis and we have Teppo's PW Weekly too. That energy and excitement seems to ripple out so far and then stop when it reaches an invisible social media force field...
  8. This post has had an inexplicable surge of Likes over the past few weeks so there seems to be quite a bit of interest in this 7 months later. I've been unable to follow these concepts up with the time they deserve but those interested in an mage field tidy up can see Toms own beautiful work mentioned on the Dec 18 blog post. Furthermore, Ryan mentioned in today's Roadmap blog post that these (Tom's) designs are already being worked on by LostKobrakai. Exciting stuff!
  9. Never used the delayed output method. Wondering if it's the best method to start with or does it increase the learning curve. Welcome to PW
  10. Yippeee. I did it See last line of this code. <?php $articles = $pages->find("template=articles-post"); //find all posts based on this template foreach ($articles as $article){ // these are this $audience = $article->articles_tag_audience; echo " <div class='small-12 medium-6 large-4 columns masonary-brick'> <div class='article-wrapper {$audience->implode(" ", "title")}'>
  11. Thanks - will try. At the moment I don't need to (don't know how to) sanitize page titles because they'll always be 1 word titles determined by me. But I like the idea.
  12. Hi I'm trying to inject a list of tags (page titles) into a DIV so that this: <div class ="article-wrapper"> becomes <div class ="article-wrapper tag01 tag 02 tag 03"> It seems very simple but it's failing to output and not throwing any warnings. It's the variable on line 4 called audience that should be scooping up my articles_tag_audience page titles <?php $articles = $pages->find("template=articles-post"); //find all posts based on this template foreach ($articles as $article){ // these are this $audience = $article->articles_tag_audience; echo " <div class='small-12 medium-6 large-4 columns masonary-brick'> <div class='article-wrapper {$audience->title} '> etc... I've also tried <div class='article-wrapper . {$audience->title} .'> which has worked on occasion. Oddly, the following is used (and works) further into my code block { echo $audience->implode(", ", "<a href='{url}'>{title}</a>"); } so I know the page titles exist.
  13. Hey @nico I hadn't (yet) as I thought it was me overlooking something. Will do soon. Thanks
  14. Merry Christmas everyone.
  15. Hi guys. Sorry for the double post just wanted to ping this again. Basically I have Index and Follow set in the Robots part of this module. How (via the Module) can I set a NOFOLLOW or NOINDEX on a per-page basis to over-ride the default? It seems like it's not possible or has been overlooked?
  16. I just updated and found this quite confusing (initially). I was thought it was a bug. I think tree is more intuitive under the Pages menu and I know my clients are hard-wired now to expect it there. I'm happy to un-wire them but I think the natural home for the tree link is under Pages and is most intuitive there.
  17. If you set the Robots field to index and follow, can you over-ride this on an individual page? There's a per-page Custom field in the SEO tab which reads I was expecting to paste <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> into this area but it outputs oddly as: <meta name="META-NAMEROBOTS-CONTENTNOINDEX-NOFOLLOW" content=""> Furthermore, the original INDEX and FOLLOW still appear further up the list of META tags
  18. Hi Kongondo, I've an early version of the blog module (2.0) running. Now that I'm more comfortable with PW selectors etc I want to custom-build my own blog using basic pages. Tags and Categories will be new pages too. In fact - it's very similar to what you've done with blog but less technical. My questions are: 1. if I start a new blog (manually built) is there anything to stop me moving the old Posts to a new containing Page (called Blog 2). 2. Ditto with Tags and categories (I'm not worried about Archives and Authors right now) 3. Not urgent but I'd like then to uninstall Blog. is there a clean way to do this and leave my tweaked templates intact or should I just leave it installed?
  19. I quite like it but it's new-ish to me so still a novelty. What do you prefer? C-Panel ?
  20. Ok- I found the issue. When you preview a site in Plesk, you can choose a preview URL for the website which generates a kind of URL as follows website-space.com.XX-XXX-XXX-XX.preview-url.com XX etc is the server IP address. My problem was caused because the preview-url.com had some DNS issues and a .htaccess error too. Thanks for the ideas guys. Looking forward now to a strong coffee and several hours redesigning this thing!
  21. Horst - ill do try that. I had disabled ProCache from the Modules area but I'll do some renaming etc and test.
  22. I'm using separate databases. Both databases have the same names, usernames and passwords though but they're on different servers. I'm not sure that's an issue though because making an admin change works fine. It's just the template files and includes which incorrectly all come from VPS 01.
  23. Have you run it through Google Page Speed insights? or Gtmetrix etc? It's not your hosting.
  24. I'm thinking I should shorten my post to what's the best way to nuke the cache and apart from Config and .htaccess, where might a legacy base path be hidden?
  25. Is the plan to merge this with the current CommentsManager or keep it separate?
×
×
  • Create New...