Jump to content

Macrura

PW-Moderators
  • Posts

    2,776
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. many many congratulations to Ryan and family!
  2. @diogo - i'm trying to use only 1 page per product; the variants of the product are basically size, so if we show all 5 size variants on the page, it's easier to make a comparison... just re-read your post, i was originally doing it with the get variable and having the server render the page based on that, but then i decided that was bad since i want to pro-cache the site, so i switched it to clientside, using js; but now i realize i also should have changed this to use a hash instead of the querystring; @soma - thanks - you also made me realize that i don't need to do this with a ?part=### querystring; i could just use a hash instead, like /#0001 ; i'm going to recode the links from the product search and the js to do the classes and then see if i can use the hash change... update - this has all been sorted... thanks soma & diogo; working well now, i'll post site url soon in showcase.
  3. Hi, I'm trying to finish a new PW site, and there's one last thing i'm trying to achieve; with this site, there are products where the product variants are child pages of the 'master product'; when a search returns a product variant, it has a querystring at the end that has the part #, like ?part=0001 the link takes them to the (master) product page, with that variant's specs highlighted (clientside using js), and an accordion open with the add to cart button for that variant. I'm trying to get it so that if the user clicks on a different variant (on the accordion), the querystring changes (to like ?part=0002) to reflect the newly chosen variant, (and then the js to highlight the specs also triggers). I've read 10 -20 solutions on stack exchange, and tried some jquery plugins, but i can't seem to figure this out... seems there should be an easy way to do it.. I looked at BBQ, which is probably what i need to use, but haven't quite got a solution yet... thought i'd run it by some of you fine folks here... TIA
  4. right, i'll just use it as is for now, since it is serving a purpose...on V2 of this site in 6 months i'll revisit and use the newer version, and also improve the page itself...
  5. @diogo - i'm using the 1st version, because i'm using 2.3 stable for this site; it's not live yet, but this will be a great thing to use, if you think it's ok for a live site; I wasn't planning on using the dev for this site as it is going live soon...guess i should stick with the 1st version for now..?
  6. @diogo - this is working great.... in 20 minutes i made a product listing page for a client that displays a sortable, filterable table of all of their products, so they can find things without using the page tree... -marc
  7. maybe regex when you run the search/replace with api.. i'm no regex guru, but i did find this...maybe a start /<script.*>.*<script src='.+gaAddons.js' type='.+'><\/script>/s or maybe html dom parser http://simplehtmldom.sourceforge.net/ also - not sure how many pages there are, but in some cases i have used phpMyAdmin with inline mode and it's pretty fast to get through a lot of content
  8. thanks kongondo... must have somehow missed that; this is actually perfect – the %= works great, and this is a small site. Speed is fine with this...
  9. @onjegolders - cheers & many thanks for pointing me in the right direction... good to know, i'll pursue this through my server settings...
  10. Hi, I'm using more or less the same search code as in the default profile, however when searching on words or combinations of words using 3 letters or less, there are no search results returned. The site in question is a company who's name is 3 letters, and there are a lot of products that are between 1-3 characters. I'm guessing this is something to do with the whitelist, or sanitizer? I'd like to be able to adjust the settings somewhere to allow for 3 letter words to be returned on a search. TIA
  11. Right...as diogo says, i mean wiring it by connecting the the design to the content...
  12. @pwired - i'm sure everyone has a different approach to this. This is how i have approached the last few sites: 1.) in the admin, define fields and templates, and add content. I stay in the backend for a while (and don't bother making the actual php files for the templates). Once the backend is stable (data structure of fields and templates, page tree) and there is enough content then i will start to 'wire up' the front end. 2.) Separately design the frontend, using whatever tools you would usually use, optionally on whatever framework you prefer (foundation, bootstrap); sometimes this part can be as simple as using html5 kickstart, or as complex as going through wireframing process etc.. i like to work with a design that is close to finished before 'wiring' it. 3.) the wiring part is pretty easy; it's good to have a list of all your field names and templates...you can configure the files in various ways, have a look at some of the site profiles for examples of this...
  13. i agree with diogo, in that using classes based on the file extension is what I have seen in practice, for icon display; interesting use of the iconfinder CDN though! Usually if I'm doing anything with icons these days it will be in a icon font, like Entypo, Fontawesome, or Glyphicons which are included in bootstrap; this way you're covered for scaling and retina....
  14. if($page->is("template=home|basic-page")) echo "has template"; @Soma....wow - Page IS ! ... better education through forum
  15. this would be pretty common <?php if ( ($page->template == 'home') || ($page->template == 'basic-page') ) echo "something"; ?>
  16. @matthew and all - thanks for looking; site will grow bit by bit; will be adding a paypal button at some point to purchase a cd, as well as some video and more news/events...
  17. Ok so I think what you are saying that when the homepage renders the content blocks, which are being done with the render method, the check I wrote won't work because the $page object is still not really 'home'; so i get that now, and will edit the code in my post..
  18. @diogo - i thought that in this case the link from the admin was actually rendering the page at it's correct URL, like: /page1/content-block-1 which is why i thought that would work... unless i'm missing something...
  19. Here is a recent site done in processwire: http://licoriceensemble.com/ modules used include formbuilder procache cropimage version control for text fields after save actions based on a template by the great team at Elemis.
  20. you can do the tabs with fields, repeaters or pages; depends on how flexible you need and the specific application. I've done tabs with all 3 scenarios; here are examples – note you will have to use the structure and class/ID names needed by your scenario (bootstrap etc..) 1.) Tabs using 2 fields on a page: <div class="tabs tab-container"> <ul class="etabs"> <li class="tab"><a href="#tab-1">Japanese</a></li> <li class="tab"><a href="#tab-2">English</a></li> </ul> <div class="panel-container"> <div id="tab-1"> <?php echo $page->bio_jp; ?> </div> <div id="tab-2"> <?php echo $page->bio_en; ?> </div> </div><!-- end panel container --> </div><!-- end tab-container --> Example 2 - tabs using repeaters: <?php //check to see if there are tabs if(count($page->tabs)) { ?> <div class="clear"></div> <div class="tabs tab-container"> <ul class="etabs"> <li class="tab"><a href="#tab-0">Additional Album Information</a></li> <?php $counter = 0; foreach($page->tabs as $tab) { $counter++; ?> <li class="tab"><a href="#tab-<?php echo $counter ?>"><?php echo $tab->tab_title ?></a></li> <?php } ?> </ul> <div class="panel-container"> <div id="tab-0"> <p>Please use the tabs to select further info.</p> </div> <?php $counter = 0; foreach($page->tabs as $tab) { $counter++; ?> <div id="tab-<?php echo $counter ?>"> <?php echo $tab->tab_content ?> </div><?php } ?> </div> <!-- end panel container --> </div><!-- end tab container --><?php } ?> Example 3 using child pages (bootstrap) <div class="content-tabs"> <!-- wrapper required --> <?php $tabs = $page->children; ?> <ul class="tabs"> <?php foreach ($tabs as $tabtitle) { ?> <li class="tab"> <a href="#<?php echo $tabtitle->name; ?>"><?php echo $tabtitle->title ?></a> </li><?php } ?> </ul> <div class="panels"> <?php foreach ($tabs as $tabcontent) { ?> <div class="pane" id="<?php echo $tabcontent->name; ?>"> <?php echo $tabcontent->body . "\n"; ?> </div> <!--close #<?php echo $tabcontent->name; ?> --><?php } ?> </div> <!--close panels--> </div> <!-- /.content-tabs-->
  21. <?php $homepage = $pages->get('/'); if($page != $homepage) { // if we're not on the homepage do this $redurl = $homepage->url . "#" . $page->name; // this is where the page will redirect to $session->redirect($redurl); } ?> don't do it this way - it won't work right on the homepage - look at diogo's post below.
  22. Soma's DataTable makes it easy to find/sort/filter large amounts of pages, but AFAIK you can't filter/sort on custom fields. Maybe a custom admin theme or a new admin page for that purpose would be best, with an ajax search for example on the top, and sortable columns..
  23. just tell them not to view page in the admin, or make those pages redirect to the anchor on the homepage, using some php in the template file (?)
  24. @renobird - funny, a few hrs ago i was trying to get my head around how to import CSV data into repeaters... not sure if it is relevant to your question, but it is something i might need to do soon (importing users where phone and email are repeatable)
  25. As far as i can tell it all works as intended - i think the paging buttons are intentional, and the sort order is not intended to toggle, but to sort ascending, so i wouldn't say bugs but maybe needs to be improved a bit this may be relevant: http://community.invisionpower.com/topic/356062-ipboard-seo-paging-issue/?hl=paging
×
×
  • Create New...