-
Posts
6,221 -
Joined
-
Last visited
-
Days Won
308
Everything posted by bernhard
-
hello, i really like the profields table and multiplier fields, but what i am missing is a way to achieve this: | page | action | with sub-pages | --------------------------------------------------------- # | page-x | include | checkbox | # | page-y | exclude | checkbox | # | page-z | include | checkbox | + you can do this via repeater field, but i really don't like the UI of repeaters. too much space wasted and not very smart to handle for example: i have a widget and want to set the pages where it is visible site structure: - home | '- cat1 | '- sub1 | '- cat2 | '- sub1 | '- cat3 now i have widget-X and want to include it an all pages... this would be: home | include | with sub-pages if i had widget-Y and wanted it to show only on cat2 it would be: cat2 | include | null if i had widget-Z and wanted it an all pages except cat2 including children home | include | with sub cat2 | exclude | with sub as i said i already achieved it with repeaters: but i need the whole page for only 3 lines! isn't there a better way? i would also need this functionality for a sports-club-website: choose player (player is a page unter /players) and then set a position (offense, defense, midfield...) and a number specific to this team i cant set this values globally because one person can have different positions and numbers in different teams thanks for your help!
-
@nico and mademyday (just in case you don't know already) you can delete pages by clicking on "move" and then on the right "trash" since 2.5 https://processwire.com/blog/posts/processwire-2.5-changelog/#admin-theme-and-ui
-
which newer frameworks are you talking about?
-
hi toothpaste, does this one help? https://processwire.com/talk/topic/8295-blog-profile-displaying-posts-in-multiple-columns/?p=80459
-
Blog profile - displaying posts in multiple columns ?
bernhard replied to Maverick's topic in General Support
i think you would have to put the surrounding <div class="row"> into markup/posts.php and close it after every second item (if you have 2 columns) so that it does not get messed up when you have different sizes of your postings. <div class="row"> <div class="col-md6">post 1</div> <div class="col-md6">post 2</div> </div> <div class="row"> <div class="col-md6">post 3</div> <div class="col-md6">post 4</div> </div> see here what i mean: http://jsfiddle.net/KyleMit/DVE4f/ that's why i'm using pocketgrid! the markup is like this: <div class="block-group"> <div class="block col3">post 1</div> <div class="block col3">post 2</div> <div class="block col3">post 3</div> <div class="block col3">post 4</div> <div class="block col3">post 5</div> <div class="block col3">post 6</div> </div> so you can "foreach" all your items into ONE surrounding block-group-div: <div class="block-group" style="text-align: center;"> <?php foreach ($page->locations as $loc) { ?> <div class="col3 block"> <h3><?= $loc->title ?></h3> <p><?= nl2br($loc->adresse) ?></p> <p><small><a href="<?= $loc->website ?>" target="_blank"><?= $loc->website ?></a></small></p> </div> <?php } ?> </div> check this fiddle i made up for pocketgrid 3 and 5 (update) columns: http://jsfiddle.net/zqwahva1/1/ (resize window to see effects) code above is a 3-column example, you can see it here: http://www.bio-fisch.at/gastronomie/ -
Blog profile - displaying posts in multiple columns ?
bernhard replied to Maverick's topic in General Support
hm... not really read here: http://getbootstrap.com/css/#grid-example-basic sorry, not enough time to go in detail. note that bootstrap is only one option that is not built into the blog profile! you would have to include it to your head section: http://getbootstrap.com/getting-started/ -
-
Blog profile - displaying posts in multiple columns ?
bernhard replied to Maverick's topic in General Support
hi luckybonanza, welcome to the forum. with processwire you have complete control over how you want to present your data, but that means you should have at least basic understanding of HTML + CSS. what you want to achieve is called a "grid". you can use bootstrap for example: http://getbootstrap.com/examples/grid/ or pocketgrid of course that are just 2 possibilities of many many more... -
what is not working? did you put your divs inside a div class="row"? <div class="row"> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> <div class="col-md-4">.col-md-4</div> </div> i prefer pocketgrid (got the hint on this forum)
-
hi gerald, greetings from vienna if i understand you correctly your wish is already built in (2.5.3):
-
$session->redirect($page->child->url); renders blank
bernhard replied to Claus's topic in Getting Started
hi claus, welcome to pw! i'm sorry, i think i don't really understand what you are trying to achieve with your first question and especially WHY you want to do that? as simple as that: <?php $session->redirect($page->child->child->url); ?> regarding renderNav: how do you call this function? it lists all pages you submit to the function, so the question is what pagearray you submit to it. read something about selectors: https://processwire.com/api/selectors/ you could do something like this: markupsimplenavigation has some more options like (exclude/include root-page) for building menus: https://processwire.com/talk/topic/1036-markupsimplenavigation/ maybe you can give us a clear site structure like this: - home |- products | |- apple | |- banana | '- orange |- news | |- news1 | '- news2 '- sitemap or maybe it's already clear for others, so you will get good answeres soon -
tried it on lightning.pw - absolutely great module!!! thank you!
-
hi zeka, welcome to processwire i switched from seblod to pw some months ago and i hope you will enjoy your move as much as i do! you will be impressed by the great community and the fast and knowledgeable answers you will get here, i'm sure (knowing the pain with seblods forum support...). to your question... coming from joomla/seblod you have to change your mindset a little bit, i hope that i can help you with some comparisons: articles/items (joomla/seblod) = pages (pw) in pw everything is a page! thats very important to understand. pages can store any data you want. it's like in seblod everything is stored in joomla articles, pw stores everything in pages. pages can have completely individual set of data-fields (eg. headline, body, images, starttime, endtime etc.). this setting of fields is defined by "templates": content types (seblod) = templates (pw) in your templates you define which fields will be available in your page. some examples: template "blog-post.php" # field "title" # field "body" # field "author" template "product.php" # field "title" # field "description" # field "price" # field "image" so if you created a new page "product" you would only have the fields "title, desc, price, image" available for editing. list&search (seblod) = selectors (pw) forget list&search types!! selectors are the way to go with pw say we want to display some products with template "product" from above: $products = $pages->find("template=product, price>100, sort=price"); foreach($products as $item) { echo "<a href=\"$item->url\">$item->title</a><br>"; } see here for a quick glance: http://processwire.com/api/selectors/ (yes, everything is very well DOCUMENTED - that's another huge difference to seblod ) don't try to bring editing features to the frontend unless it is REALLY necessary joomla has a very complex backend, so i tried to hide this complexity for my clients by giving them edit access only for some parts of their website from frontend. processwire's backend is so simple that you will not need to hide it from your client anyway: if you have some experience in seblod, i think you will learn pw really fast and enjoy how clear and simple everything can be and now put everything together: https://processwire.com/talk/topic/693-small-project-walkthrough-planets/ if you have no dev-environment you can instantly setup a fresh copy of processwire here for free: https://lightning.pw/ have fun with processwire
-
hey guys, thank you! it worked for me with the following values (for testing): index.php ini_set("session.gc_maxlifetime", 60); // changed $config->sessionExpireSeconds to 60 config.php ini_set('session.gc_probability', 100); // 100% probability ini_set('session.gc_divisor', 100); ----> it cleared all session files older than 60 seconds on every pageload.
-
hmm... thank you sinnut for your fast reply! i'll give it some more days. just for the record, i have >7500 files right now. lets see how that changes over the next days... couldn't i also try to increase probability to 99 or 100? to make sure that it works and then change it back to 1?
-
hi everyone, unfortunately i came up to this problem as well. server is Ubuntu 12.04.5 LTS; i had > 140.000 files in the sessions folder i have these two lines in my _init.php file (basic intermediate profile structure) ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100); phpinfo in one of my template files says this, so i guess the changes should be working 2 days ago i deleted all of the session files, but today i have again > 7000 files, oldest from the day before yesterday, so far over 24 hours old! any ideas? thanks in advance!
-
great that you fixed it. when i tried to change the focusarea i think it didn't update the cropping->inside image. is this a bug or did i miss anything? look at the third image: it has still the old focusarea. i also had to append ->url to every image in your github (and first post) sample to work
-
hi totoff, using the TemplateFile class is perfect for this, have a look at ryans blog profile: https://github.com/ryancramerdesign/BlogProfile/blob/master/templates/archives.php#L101 simple way: file "site/templates/markup/contact-markup.php" (naming it -markup here to point out the difference to the standard template file) John Doe<br> Sample Street 1<br> Sample City template file eg "site/templates/contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); echo $contact->render(); // don't forget to echo! more flexible: with variables! markup/contact-markup.php <?= $name ?><br> <?= $address ?><br> <?= $city ?> contact.php $contact = new TemplateFile(wire('config')->paths->templates . 'markup/contact-markup.php'); $contact->set('name', 'john doe'); $contact->set('address', 'sample street'); $contact->set('zip', 'sample city'); echo $contact->render(); edit: in your case you can do $sidebar = $contact->render() instead of echoing it... forgot the point of delayed output
-
+1 ImageFocusArea if you drag the area outside of the modal window it will close the modal. maybe you can handle this? besides that, cool module/idea. looks promising!
-
thank you mindfull!
-
https://processwire.com/talk/topic/1920-processwire-logos-download/?p=26899
-
hey nico, i would be very interested in a showcase how you did that
- 7 replies
-
- 1
-
- CRM
- Project Management
-
(and 5 more)
Tagged with:
-
you mean you want to apply the "active" class only to the first item? maybe something like this <?php $active = ' active'; // set active for first item foreach($page->images as $img) { ?> <div class="item<?= $active ?>"> <img src="<?php echo $img->url; ?>" /> <div class="container"> <div class="carousel-text"> <h2><?php echo $img->description; ?></h2> </div><!-- /carousel-text --> </div><!-- /container --> </div><!-- /item --> <?php $active = ''; // remove class "active" for following items } ?> i like to use short tags <?= $var ?> instead of <?php echo $var; ?> maybe you have to change this depending on your server
- 4 replies
-
- 1
-
- Current image
- images Current image
-
(and 1 more)
Tagged with:
-
hi salles, welcome to the forum there's also a blog module - i have no experience with it, but maybe it fits more to your needs
-
ok your question was some days ago but anyway: this post from ryan should give you an answere! as far as i understand, the main benefit is that you can define things wherever you want and then do the output at the right position. if you had a slider in a sidebar for example and needed a special stylesheet for that slider it would be too late to include that with a html-first approach. outputting everything afterwards lets you add $stylesheets[] = 'slider_style.css'; wherever you want and then put it out in your <head> right in place like this: <head> ... foreach $stylesheets echo <link ... stylesheet_name.css> </head> <body> <div id="main"></div> <div id="slider"></div> </body>
- 206 replies
-
- 1
-
- standarisation
- templates
-
(and 1 more)
Tagged with: