Jump to content

Ben Sayers

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Ben Sayers

  • Rank
    Jr. Member

Profile Information

  • Location
    Howell, Michigan, USA

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi @kongondo, no problem at all! I'm just happy to have your support 😃 - I'll stay tuned, thanks!!
  2. Hi @kongondo, did you have a chance to review my blog-posts template above?
  3. Thanks @Robin S, that did the trick!
  4. Hello, I've used this module on a few sites in the past but recently tried using it inside a repeater (to reduce the number of unnecessary pages) and I'm having an issue. If I add a new repeater item, I can't select the rating until I save the page. I can see the stars when I hover but if I select a rating, it just goes back to the greyed-out stars. Is there a quick fix for this? I wasn't sure if this issue was only happening with my installation but I just tried it on another website and had the exact same problem. All suggestions are welcome - thanks! Edit: I've also noticed that once I have set the value of the star rating inside my repeater item and save the page, if I try to go back in and change the value, it won't let me.
  5. Sure thing, here is my 'blog-posts' template file, it's identical to my 'blog' template file. <?php namespace ProcessWire; include('./_head.php'); // include header markup ?> <!-- Page title --> <section id="page-title"> <div class="container-fluid"> <div class="page-title"> <?php echo "<h1>" . $page->get('headline|title') . "</h1>";?> </div> <div class="breadcrumb"> <?php echo "<ul>"; $parents = $page->parents; foreach($parents as $parent) { $url = $parent->url; echo "<li><a href='$url'>{$parent->title}</a></li>\n"; } // show current / "we are here" page as well, but not as link: (last element) echo "<li>{$page->title}</li>\n"; echo "</ul>"; ?> </div> </div> </section> <!-- end: Page title --> <!-- Content --> <section id="page-content"> <div class="container-fluid"> <!-- post content --> <?php // Change options for pagination $options = array( 'numPageLinks' => 5, 'listMarkup' => "<ul class='pagination justify-content-center'>{out}</ul>", 'itemMarkup' => "<li class='page-item {class}'>{out}</li>", 'linkMarkup' => '<a href="{url}" class="page-link">{out}</a>', 'currentItemClass' => 'active', 'separatorItemLabel' => '...', 'separatorItemClass' => 'page-link', 'currentLinkMarkup' => '<a href="{url}" class="page-link">{out}</a>', 'nextItemLabel' => '<i class="fa fa-angle-right"></i>', 'nextItemClass' => '', 'previousItemLabel' => '<i class="fa fa-angle-left"></i>', 'previousItemClass' => '', 'lastItemClass' => '', ); $blogposts = $pages->find("template=blog-post, sort=-blog_date, limit=9"); setlocale(LC_ALL,"en_US.UTF8"); $pagination = $blogposts->renderPager($options); ?> <?php if(count($blogposts)): ?> <!-- Blog --> <div id="blog" class="grid-layout post-3-columns m-b-30" data-item="post-item"> <?php foreach ($blogposts as $b) { if(count($b->blog_images)) { $firstimage = $b->blog_images->first(); $thumb = $firstimage->width(640); } echo "<div class='post-item'> <div class='post-item-wrap border shadow'>"; if(count($b->blog_images)) { echo "<div class='post-image'><a href='{$b->url}'><img alt='{$b->title}' src='{$thumb->url}'></a></div>";} echo "<div class='post-item-description'> <span class='post-meta-date'><i class='fa fa-calendar-alt'></i>{$b->blog_date}</span> <span class='post-meta-comments'><a href='{$b->blog_author->url}'><i class='fa fa-user-circle'></i>{$b->blog_author->title}</a></span> <h2><a href='{$b->url}'>{$b->title}</a></h2> <p>{$b->summary}</p> <a href='{$b->url}' class='item-link'>Read More <i class='fa fa-arrow-right'></i></a> </div> </div> </div>"; } ?> </div> <!-- end: Blog --> <?php echo $pagination; ?> <?php endif; ?> </div> <!-- end: post content --> </section> <!-- end: Content --> <?php include('./_foot.php'); // include footer markup ?>
  6. My apologies for the confusion, Kongondo. I updated the post format in my original post on this forum. So if my issue is indeed related to the 'posts' URL segment, do you (or anyone else) have any idea how to resolve it? All suggestions are welcome, I've been fiddling with this for almost two weeks, lol. Edit: I can confirm that it is the "posts" part of the URL that is causing the issue, I tried redirecting "blog/test/" and it redirected just fine but "blog/posts/test/" does not.
  7. Sorry, my post on the forum should have said domain.com/blog/posts/some-post/ - I am using blog style #1.
  8. Hi Dragan, I'm not sure if it matters, but I use the beginner profile, I don't see a ready.php file - I only see that file in the Default or Regular profiles.
  9. Sorry Robin, you were right, I was working in /site/templates/init.php so I removed the code from that file and placed it in a new file at /site/init.php but I get the same result (nothing happens). How does /site/init.php get called? I don't have a /site/ready.php file. I disabled ProCache when this all started, it doesn't have any effect when it's on though (it's currently off). Really appreciate your help, I don't understand why the Jumplinks work with any page that doesn't contain "blog/". Edit: I had the file named incorrectly (/site/_init.php) so I removed the underscore in the name and now I can see the dump is working but only for URLs that don't have "blog/" in them and I'm not redirected to the blog landing page, I get a 404. If I try a link with "blog/" in it, I see the blog landing page but the URL is still the old one instead of domain.com/blog/.
  10. Hi Robin, I tried this but I don't see anything being dumped via the Tracy Debug bar. Even when using random letters, I see my 404 page but nothing in the dump. If I load one of the blog posts that should be redirecting, I see the the Blog landing page content but it still shows the old URL (the same thing that happens when I try to use Jumplinks to redirect blog posts). Your code is the only thing I have in my init.php file except for my _func.php include. The only edits to my .htaccess file are those required by ProCache (gzip & manual directives). I do use url segments for the amp versions of my pages but I haven't created an amp version of my blog pages yet so I'm stumped on what can be causing this. I'm using the latest versions of PW and all modules.
  11. Hi Robin, I'm not sure how to do that... Can you elaborate? I enabled Tracy Debugger but don't see any errors when I visit one of the blog post URLs that should be redirected. Thanks for your help!
  12. Hi Robin, thanks for the advice! I tried adding this to init.php (using my real posts URLs of course) but I get the same result as when I try to add them using Jumplinks. If I load one of the URLs in my browser, I see the blog landing page but the URL is still the old one (/blog/post-title/ instead of just /blog/. If I try to redirect a page using this code that isn't a blog post, it doesn't work, I just get a 404.
  13. No worries, thanks for getting back to me! To remove the posts, I went to the Blog --> Posts tab in PW, checked the boxes for the posts I wanted to remove, then went to Actions -> Delete. I'm using Blog Style 1. I'm able to redirect any page in the website using Jumplinks unless it has "blog/" in it.
  14. Hi @kongondo, I'm having an issue with Jumplinks and I haven't had any luck on that support forum so I thought I would try here since I think the issue might be related to the blog plugin. Can you check my posts here and let me know if you've experienced this behavior? https://processwire.com/talk/topic/8697-jumplinks/?do=findComment&comment=192151
  15. I deleted the posts. I do use URL segments for the AMP versions of my pages but I'm not creating any jumplinks for those (yet). The only htaccess directives I added are for alternate domain names to redirect them to our primary domain. Like this: RewriteCond %{HTTP_HOST} ^secondarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.secondarydomain.com$ RewriteRule (.*)$ https://www.primarydomain.com/$1 [R=301,L]
×
×
  • Create New...