Jump to content

virtualgadjo

Members
  • Posts

    219
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by virtualgadjo

  1. hi, two simple ways to do this - i assume your sections are inside a id="mainwrapper" (just for the example, use the id you linke ? ) div in your page specific templates you can just use the sections you need, done... - the other way is to simply put every section inside a php if <?php if ( $page->content3 != '' ): ?> <section class="content3"> ... </section> <?php endif; ?> done ? have a nice day
  2. Hi, well, pw speaking, this is the simplest thing you can imagine ? actually, you won't need any module to realize what you describe, just page(s) and fields remember the pw way of thinking, everything is a page, so, just create a page upcoming dates which will have as many subpages you want, every subpage containing all the fields you need, date, title, description, tags, and so on, done you could even do the same thing with a simple page and a repeater field, each repeater element containing all those fields too, the only thing to keep in mind is the number of elements you'll need, if there is really a lot, maybe it will be faster to edit with subpage than with a repeater, if you're thinking about 20/50 upcoming dates, go for a repeater, everything will be in the upcoming dates page once you'll have done it, you won't believe how easy it was with pw ? have a nice day
  3. Hi, juste in case it would help, i nearly always add this maximize ability to ckeditor fields it adds a button to the field toolbar that allows you to write with a full screen field (very useful with heavy content pages...) you just have to go back to normal size to save but honestly, not really a problem have a nice day
  4. don't worry we have all made every kind of mistakes or omissions you can imagine at our turn... and solving them is the best way to learn and not forget again ? glad everything works fine now have a great pw trip ? and of course, have a nice day ?
  5. hi, this makes me going back to what i was thinking ? is your website installed in a folder on your server, is there a domain aiming to this folder, have you installed pw using your domain (if any) what automatically fills the config file with the right config urls this being said, have a look to the bottom of your config file looking for this var $config->httpHosts = array('...') when you look at it, is the url the one you use to preview you website, if not your problem is here ? i must say i never run into this kind of issue as i always write my css, js and so on paths myself without the php part /site/assets/css/...css but if your config file url is the good one, in the source code you should see the right path to your website domain/site/templates/styles/main.css in fact, have look at what is in the config.php array and compare it with the path in the source code, you'll probably find a "slight" difference ? (usually on install, pw, checks if the folders that need to be are wirtable, a path to those folders should not return a 403 (nor a 404 by the way :)) have a nice day
  6. hi, honestly this kind of things is usually due to the path you've set to those css files (nothing to do with pw or not actually) a simple way for you to check, start emptying the cache (module page render) then look at the page source code and click on the css file link, you'll see if your run into a 404 or if you see the file source simple thing to take into account, this may depend on if you're working with a vhost/domain or juste pointing to your hosting root and if your links start with a root / or not hope it'll help haves a nice day
  7. Hi, @Jan Romero is right, if you only want to calculate the difference between two years, the first solution will work but, if you want to calculate the number of years between a specific date and today, then, as easy to achieve with php but switch to date_create() and date_diff() <?php $start = date_create('1980-07-01'); $today = date_create(date('Y-m-d')); $diff = (array) date_diff($today, $start); echo $diff['y']; the result will change every 1rst of July, a simple way to calculate an age and not only the difference between two years just print_r($diff) if you want to see how far you can go with what you get and could display with date_diff ? have a nice day
  8. well if you want a dynamic code depending on an entry, yes you will ? your hanna code tag could accept either [[count_years]] or [[count_year startyear="1920"]] in this case you can just start your hannacode with a default value $start = $startyear != '' ? $startyear : 1980; this way you cover both insertion, with and without attribute and my pleasure ? have a nice day
  9. Hi, the issue is not an Hannacode one but a simple php one try $start = 1890; // your attribute no need of strtotime $thisyear = date('Y'); $diff = $thisyear - $start; echo $diff; it should work have a nice day
  10. hi, honestly, hard to answer without seeing the whole page source code but you can bet that when this kind of thing happens you have somewhere either an unclosed tag (hence the whole page source code) or, and it happens more often than you could imagine, something like two body tags ("like" because it happens with a few other important tags too) just an example of when this kind of thing happens, using markupregions and forgetting an html head in another template than the _main.php => two html head and opening bodies => a little mess ? hope it may help looking for the issue origin have a nice day
  11. Hi, yes ? have a look at this blog post https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/ have a nice day edited to say i should have clicked on your links before answering... so, just yes ?
  12. hi, wow, of course, first thing to check out, i forgot, you're right ?
  13. Hi, have you tried adding CreateDiv to CKeditor toolbar ? you'll find it in the field setting "input" tab => CKEditor settings this allows you not only to create div directly from the toolnar but will also keep yours if you wrote some in the source code hope it helps have a nice day
  14. Hi @Alkrav my pleasure and, wow, good idea a little search field when dealing with website with a lot of pages in my case i have three situations that help me not be lost in the matrix ? - when it comes to complex repeater in which i know i'll use many images, i put an image field in each repeater item (as they are pages, it works like a charm) - in the case you describe, the image field in the "parent page", well, not too long to select but here i admit i won't deny the use of a search field for big website or, simple way to prioritize this "parent" in the list page - when it comes to images i know i'm going to use in many pages i usually have a "stock page", hidden from the front side and the sitemap, in which i put some fields, default translations (with Ryan functional fields module), some default fields i'll use in many pages and... an image field i often give this page a loooong title that make it easy to find in the list ? but i like your search field idea, you should suggest it in the wishlist forum! Ryan may like that too ? have a nice day
  15. Hi @teppo thanks a lot for your insight, i was assuming something like that as it sounds very logical according to the pw "everything is a page" concept and us crazy devs are quite found of logics ? but thank you very much for the hook, it may help for clients who would be confused after a pw update and i'm sure @Alkrav will love it too ? have a nice day
  16. hi, actually this could be seen as a more strict pw way of thinking pages... each item of a repeater is a page by itself, that's what allows you to use the same fields many time in a "parent" page so far, pw repeater items ckeditor went browsing its parent page images but imagine you had an image field in the repeater item, the problem would be the same but inverse i know we can tell a ckeditor field which field to go looking for images but, in a repeater, you would have as many of this image field with the same name as you have repeater items and, have a look at the item name, a little harder to find it in a list of pages than the parent page the repeater is in i think this is the reason for this little change of behaviour have a nice day
  17. Hi @stanoliver in this case, i remember an old post that may help you adapt the code to your own need it does, at least visually, exactly what you are looking for bernhard added a more recent solution that may worth a look (like everything this guy writes here ?) have a nice day
  18. hi, i don't know when it come to a slogan but if you need a function button or a dropdown with a series of actions behind each link, it's quite easy to do this with a module it won't go before the save button but will be easily visible in the top menu bar like in this french website i've made in case it helps ? have a nice day
  19. Hi @joe_g great, good to hear everything works fine ? you'll see, in certain cases you'll also have to use a personal config.js file for your ckeditor but usually pw does the job without help ? have a nice day
  20. @Mika Hi, don't be confused by this char length thing about the page title, it actually concerns the page title tag not the title of the page the title tag is not a native pw field and and would not advise you to use the page title for both things as far as SEO is concerned, google indeed said that the first 60/65 chars are really useful (taking into account that the more a word is at the beginning the stronger it is in a title tag, you don't make a keywords list but you are not too literary either and you wouldn't like your displayed page title to look like this tag ? have a nice day
  21. hi, you'll see, it's easy to use (of course instead of $p->template !='xxx' you can use $p->parent != 2 or whatever pw page object item you want) and once you'll have played with hooks, it gives pw even more power if possible ? have a nice day
  22. Hi, yes, it could be ? i've had the same problem once forgetting to change this param when migrating my website from local to online have a nice day
  23. Hi, as Robin said, so far it's not a native pw selector and, being a great fan of sql queries i do like his solution ? now if you want to take advantage of what pw gives you with selectors, you can just add a numeric field to the templates you want to find name it as you want (i'll use titlelength for my example) in the field tab of the... field set it as hidden then in your ready.php file put something like this (the namespace is just here in case you don't have a ready.php file for the moment) <?php namespace ProcessWire; if(!defined("PROCESSWIRE")) die(); $pages->addHookAfter('saveReady', function($e) { $p = $e->arguments(0); if($p->template != 'template_to_play_with') return; // you could also use an array of templates to exclude and if (in_array($p->template, $your_array)) $ln = strlen($p->title); $p->set('titlelength', $ln); }); now you can filter using titlelength>10 hope it helps have a nice day
  24. Hi, if you look at the plugin js source code, you'll see its dependencies requires: 'api,widget', and, downloading those ckeditor addons, you'll see widget has quite a lot too so, first, you'll have to download those https://ckeditor.com/cke4/addon/api https://ckeditor.com/cke4/addon/widget https://ckeditor.com/cke4/addon/clipboard https://ckeditor.com/cke4/addon/notification https://ckeditor.com/cke4/addon/lineutils they are not default plugins installed in pw then, well, i suppose you've put the detail plugin files in a... detail folder in your /site/modules/InputfieldCKEditor/plugins folder, do the same with all those plugins folders too but it's not finished ? go to your ckeditor field input tab and allow all those plugins and, afterwards but considering your post i think you've already done this, add Detail to your ckeditor toolbar, job done ? ckeditor is highly configurable but it's not always that simple ? have a nice day
  25. hi, even if i must say i find this a curious idea which sounds so much like a wordpress idea it hurts ? you'll find the working answer in deltavik post in the last thread you quote more, as a visitor, i really prefer a clear url that makes me know where i am in the website structure and avoids the need of breadcrumbs disfiguring the pages ? pw not being wp you don't have to avoid default structure url as post, portfolio and so on, you can name your pages the way you want giving your visitors a good idea of what and where they are strolling in, a better UX than a simple domain with everything not organized following (not to speak about SEO...) have a nice day
×
×
  • Create New...