Jump to content

webweaver

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by webweaver

  1. More on Date sorting.. It seems once I open a post, then close, it sorts correctly in descending order. But I can't sort by ascending and when I click on the Date column header it doesn't sort on the fly. All the other columns work fine.
  2. Btw, I think I may have found a bug - In the posts dashboard I can't sort by Date properly.
  3. Ya, I hesitated on the img tag Basicly I want them to see a majority of the post in full formatting (as much as possible) while they are on the blog listing page. But line 602 is surrounding the entire post in a paragraph, so there is still no formatting within it. The paragraphs within the post itself were getting stripped. I should mention also that I enabled CKEditor in for the blog_body field and changed the code in ProcessBlog.module for quickpost_body to use CKEditor also (line 387), but the tags were being stripped from the quickpost CKEditor, so had removed the sanitizer from quickpost (line 1441).
  4. @Kongondo - Thank you very much for the explanation to fix. Next time I'll know not to pull my hair out for 2 hours and just ask the question and wait for the reply Btw, the generated summary strips out all tags so the posts in the blog list looked pretty bad.. So I removed the strip tags.. But then had another problem - if the cutoff was in the middle of an anchor tag, the "view more" anchor tag would become nested and didn't work.. So I put back in the strip tags but allowed <p> and <img> tags.. The summaries in the blog list look much nicer now. ex: Line 543 in MarkupBlog.module now reads: $summary = strip_tags(substr($page->blog_body, 0, $summaryLimit), '<p><img>');
  5. Thank you Kongondo and Ryan for these excellent modules! I've implemented this into a site I'm developing and am having an issue... The blog posts are not truncating. I have the summary length set to 150 , but nothing is being truncated. I know when i created a post I'm populating the "blog_body" field and these settings seem to be for the "blog_summary" field (which does is not one of the fields for the template).. From what I can see in the MarkupBlog.module, there is a conditional if summary is empty to pull from the blog_body and truncate. The blog I'm working on is here: http://shootkta.info/blog/ .. If you have any thoughts, please let me know.
  6. This module accomplishes exactly what I was looking for today. Thank you very much Adrian for making this available.
  7. @Soma - I'm not sure. The site I posted the attachment for was the Teflon version I download in Sep '13. The lastest site I developed I downloaded your Teflon on 1/23/14 (somatonic-teflon-admin-theme-pw2-f87f6b6). @Diogo - Thanks again - that clears things up for me and I now understand.
  8. @Soma - yes, love teflon. I'm running pw 2.3 on servers that are not going to be upgraded to the lastest php or mysql - I have too many sites running scripts that will break if I upgrade mysql or php But I have already ordered a new dedicated server where I will install the latest php/mysql to run all of my future 2.4 pw sites Once I install my first 2.4 site, I'll be curious to see if the new default admin still needs some more teflon
  9. Thanks so much Diogo! I knew I had the order reversed but wasn't sure how to rewrite it. I need to familiarize myself more as to when to use "get" vs "find" .
  10. I have a News listing page that is pulling from a list of articles and I'm trying to sort by date (descending) and limit the articles to four per page. I have attached a screenshot of the articles in the pw admin I have added their dates (pw field article_date) to the right. You can see that they are not physically in order. When I try to sort the children by date and limit to 4, it is actually taking the first 4 entries in pw and sorting them by date, then the next 4 and sorting by date. When what I want is sort ALL of the articles by date then display only 4 at a time. Here is my current code: <?php $articles = $pages->get(1133)->children("limit=4")->sort("-article_date"); foreach ($articles as $article) { echo "<div style='font-size:.75em; margin:0; padding:0 5px;'>".$article->article_date."</div>"; echo "<h4 style='margin:0; padding:0 5px; margin-bottom:20px;'><a href='".$article->url."'>".$article->title."</a></h4>"; $summary = substr($article->article, 0, 600); if(($pos = strrpos($summary, ".")) !== false) { $summary = substr($summary, 0, $pos); } echo "<img style='float:left; margin-right:20px;' src='".$article->article_image->url."' />"; echo "$summary ..."; echo "<div style='clear:both;'></div>"; echo "<div style='float:right;'><a class='project' href='".$article->url."'>Read More »</a></div>"; echo "<div style='clear:both;'></div><hr>"; } ?> <div class="clr"></div> </div> <div class="clr"></div> </div> </div> <div> <?php $pagination = $articles->renderPager(); echo $pagination; ?></div> If I take out the ("limit=4") and just do sorting, the sorting is correct. *also for some strange reason the article "Value Activation: a different business model" is not showing up at all - but that's a different issue. Any help would be appreciated.
  11. This is just one of those happy fan comments - there's no dedicated forum for those I started using PW a few months ago and have since used it in about 10 projects. I was just in the middle of a project and said out loud, "Man I love this Process Wire!" In my exuberation, I decided to just make a quick post to express my satisfaction. PROCESS WIRE rocks!!! Thank you Ryan and all those that contribute (Apesia, Soma, Kongondo, and the rest)
  12. I get it now, just need to setup my css to have the parent class also work like the current-menu-item class, duh
  13. Thanks Kongondo.. I already have the parent class => parent.. But not sure how to make that work for what I mentioned I'm trying to do. I wasn't aware of the support forum specific to MSN, but now I see it. Sorry to go against the grain, but I don't like the way that it works - it's just one thread with everything thrown into it. Would much rather see topics that address specific questions.
  14. Is there a way in MarkupSimpleNavigation to keep the parent active when on one of it's child pages so that the navigation menu still shows the Parent highlighted?
  15. Soma, I was trying to do that but couldn't figure out exactly how - I'm still pretty new at this For example, I tried this with no success: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); $rootPage = $page; $options = array( 'parent_class' => 'parent', 'current_class' => 'current-menu-item', 'has_children_class' => '', 'levels' => false, 'levels_prefix' => '', 'max_levels' => 2, 'firstlast' => false, 'collapsed' => false, 'show_root' => false, 'selector' => '', 'selector_field' => 'nav_selector', 'outer_tpl' => '<ul class="dl-menu">||</ul>', 'inner_tpl' => '<ul class="dl-submenu">||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<a href="/{url}">{title}</a>', 'xitem_current_tpl' => '<a href="/{url}">{title}</a>' ); echo $treeMenu->render($options,$rootPage); ?>
  16. I guess this was quite easy to do w/out MarkupSimpleNavigation... <?php echo "<ul>"; foreach($page->children as $child){ echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } echo "</ul>"; ?>
  17. I know this must be simple, but I'm having a heck of a time trying to figure this out. I want to add a menu into a page that shows the children of that page. In other words, this page is just a container page of the sub pages and I want to display those sub pages as a menu inside the current page. Please Help
  18. I saw in a previous post (about a year ago) that pagination for repeaters was on the roadmap. Is this working yet or an eta? I'm hoping you'll chime in on this Ryan. Thanks! I'm currently working on a site where I have a repeater setup for a portfolio that filters the images by category. So in the repeater I have two fields (category - radio options, and image). But I also need to paginate through the images.
  19. Here is a simple tutorial how to enable the Justify capability in CKEditor First, download the plugin at http://ckeditor.com/addon/justify . Copy the "justify" folder to the "plugins" folder under ckeditor in your modules directory and upload to server. Edit the field that is using the ckeditor and go to the input tab.. Under CKEditor Setting > CKEditor Toolbar insert the following line where you want the icons to appear: JustifyLeft, JustifyCenter, JustifyRight, JustifyBlock Use ACF? choose "No" Under Extra Plugins insert: justify
  20. For four years I said the exact same thing about ModX.. Then I stumbled upon an article from someone explaining why they switched to PW.. I reluctantly checked out PW, because I had already fully committed myself to ModX. Like you, I'm very glad to find PW. And also to find such good community support!
  21. Thank you for the quick response kongondo, exactly what I was needing - works great.. Btw, kongondo, you were the one who initially got me excited about ModX after I got a handle on Wayfinder using your tutorial. The fact that you're here now is a confirmation that PW is the new game in town
  22. Quick intro: I'm coming to ProcessWire from ModX with no experience in PHP I've setup a portfolio on my testing site. The listing page has pagination with 6 pages per web page. When you click to go to a detail page, I have "Previous" and "Next" button links to traverse the detail pages in the portfolio. You can see an example detail page here http://websiteprofessionalstest.com/our-work/villagio-student-housing/ . The page in the example above is the first page in the array, so I do not want the "Previous Project" button to show. I also do not want the "Next Project" button to show on the last project page. Here is the code I have tried to not show the "Previous Button" on the first page: <?php if ($page->prev->url != $page->url): ?> <div><a class="project" href="<?php echo $page->prev->url; ?>">« Previous Project</a></div> <?php endif; ?> My thinking here is that on the first page the $page->prev->url and the $page->url are the same, so the if statement shouldn't execute. But it doesn't work. My guess is I'm going about this in a completely wrong way. I tried some other things with PageArray, but I guess I don't understand yet how to work with PageArray and WireArray. Any help would be a appreciated. David F
  23. @arjen.. I see what you are saying. But that doesn't match the actual horizontal navigation that is on the website. Yes, I would have http://domain.com/home as a page too. When I build a basic static website, I have an index.html file (home page) that is on the same level in the hierarchy as say aboutus.html, and contact.html. Aboutus.html and contact.html are not sub navigation - they are on the same level as Home. Here is a graphic to illustrate my point: Not to belabor the point, but the first way makes more sense to me where the root page in PW admin would be considered a "container" of all the pages on the website - including the home page. I doesn't make sense to treat the Home page as a container to other pages that are not sub pages, but instead are on the same level (at least as far as the navigation on the actual website is displaying it). In my view, it would be more intuitive for the "Home" page in PW to be named something that represents it as a container for the site (ex: "Web"). Another example.. The folder structure on my server has "public_html" as the root folder. I would not post on my front end website a page called "Public HTML", it is not a page, only a containing folder. The index.html (home page) rests inside the public_html folder and is on the same hierarchal level as other pages in the primary navigation. I know PW does not force it's default on anyone (great thing about PW) and it has been laid out very clearly how to take the other route. But I guess it's just a little nitpicky thing I'd like to see changed in the default PW admin, so am making my case
  24. @Ryan.. Let's say I have a site with the following navigation: Home | About | Services | Contact . I don't view "Home" as the ancestor in this navigation, instead I see it as the "Home page" on the same level as the "About Us page", etc. So if one of the pages had sub navigation, the heirarchy would be like this: Home About ServicesWeb Design Web Hosting Contact If "Home" were the root then it would look like this: HomeAbout ServicesWeb Design Web Hosting Contact To me the former way represents the reality of the website structure. The latter way says that "About", "Services", and "Contact" are sub navigation to "Home" which may represent better the structure of the default PW backend, but not the front end website. I hope you don't think I'm arguing about this Just trying to clarify my thought process. Thank you for the explanation regarding SEO - very helpful. *quick side note: I have my profile updated to receive email notification when there is a reply in a thread I'm involved in, but I'm not receiving any notifications
×
×
  • Create New...