Jump to content

virtualgadjo

Members
  • Posts

    320
  • Joined

  • Last visited

  • Days Won

    5

virtualgadjo last won the day on October 9

virtualgadjo had the most liked content!

1 Follower

Recent Profile Visitors

4,557 profile views

virtualgadjo's Achievements

Sr. Member

Sr. Member (5/6)

199

Reputation

  1. hi again πŸ™‚ @monollonom is right the solution is to use pages, you can do this with the page reference fielfd and get this kind of thing quite easily sorry most things are in french its just in a demo website i use to help french guys with pw πŸ™‚ you can see i hav a spΓ©cial field named resume and a list of radio button coming from a page reference field allowing hidden pages, the parent page is like this as you can read in the blog page, you can use any kind of type for those page reference fields, actually it works a lot like the way i use them for blog categories and/ot tags have a nice day
  2. Hi again πŸ™‚ actually, all those fields are not available in an image field by default but become so when you associate a specific template to the given image field say for example you have an image field named myfooimg if you create a template named field-myfooimg all the fields you use in this template will be availabe for you image datas, text, list of radio/checkboxes and so on... have a nice day
  3. Hi when it comes to a "select" just install the select options module which is in pw by default and then when adding a new field you'll be able to choose when it comes to images, having a close look at the full article from which the image you show comes https://processwire.com/blog/posts/pw-3.0.142/ you'll see that it relies on a template you create witjh a given naming convention --- quote--- Rather than trying to come up with some new way of defining custom fields, you define the custom fields for your file/image field with a Template. Simply create a template having the name "field-[name]" (replacing "[name]" with the name of your file/image field), add fields to it, save, and that's it. It's okay to add fields that might duplicate those already on your regular page template, as the fields for files/images are properties of each file/image rather than properties of any page. ------- not only will you be able to use radio button but nearly any kind of fields you would like to associate to the image hope it helps a little πŸ™‚ have a nice day
  4. Hi, being french, you can imagine that most my websites are multinlingual πŸ™‚ and i alwys use this kind of language switcher foreach($languages as $language) { if( ! $page->viewable($language) ) continue; $url = $page->localUrl($language); $iso = $language->name == 'default' ? 'fr' : $language->name; // use your own default language instead of fr... if($language->id != $user->language->id) { echo '<a hreflang="' . $iso . '" href="' . $url . '" title="' . $language->title . '">' . $iso . '</a>' . "\n"; // echo '<a hreflang="' . $iso . '" href="' . $url . '" title="' . $language->title . '"><img src="/site/assets/img/' . $iso . '.svg" alt="' . $language->title . '" /></a>' . "\n"; // echo '<a hreflang="' . $iso . '" href="' . $url . '" title="' . $language->title . '">' . $language->title . '</a>' . "\n"; } else { echo '<span>' . $iso . '</span>' . "\n"; // echo '<span><img src="/site/assets/img/' . $iso . '.svg" alt="' . $language->title . '" /></span>' . "\n"; // echo '<span>' . $language->title . '</span>' . "\n"; } } and never ran into the issue you describe whether the urls are ...com/toto and ...com/en/toto or ...com/fr/toto and ...com/en/toto (in this case you have to give a name -the name you gave you default language- to the homepage, not the preferred way tu use pw but it works if necessary) the two important things are the use of $url = $page->localUrl($language); like @monollonom says and the line where $language->name is defined for the default language in case it may help πŸ™‚ have a nice day
  5. Hi @franciccio-ITALIANO form me, exactly as @BrendonKoz says, your website works perfectly and as he says too i tend to think that it's a browser cache issue i've alreaddt had the same kind of issue with an ssl certficalte not installed, the web site seen as not secured by the browser and keeping being seen so even after a correct install of the ssl a simple solution (except from testing with another browser like we've done for you :)) for your current machine and browser is to empty the borwser cache/history (you just need to erase the files and offline data, don't loose your passwords/cookies and so on if not needed) have a nice day
  6. Hi, well, all this sounds quite normal, when starting an install process, if the htaccess file is named .htaccess the web site will try to work as if it were installed which is not the case in the contrary, wuen the install process is running/finished this file needs to be renamed as .htaccess with the starting period else it won't work as the server won't find it as a genuine .htaccess file il you have a look Γ  the install.php file code, you'll see when the mutation takes place πŸ™‚ have a nice day
  7. Hi welcome back to paradise πŸ˜„ In my case, let's keep it simple. - blank profile for all sites - and generally speaking, no CSS framework. sorry, I realize that's a bit brief... let me elaborate a little, i used bootstrap a lot which once was a good selling point for agencies: β€œthe website will be responsive with bootstrap” boom, sold... i still use it sometimes, but more for tools made up of forms and tables. In that case, i use purge.js and end up with a bootstrap of about 30 kb. today, the trendy selling point would be tailwind, for me, no way!!! πŸ˜„ i love css too much (scss for me) and clean HTML without 20 utility classes per tag. In the semantic vs. utility class debate, let's say I'm 90-95% semantic and 5-10% utility (my own little scss "framework" easy to modify and override without !important everywhere). well, I'm not sure if any of this is very useful πŸ™‚ but the idea is simple: processwire offers so much freedom in coding, the least i can do is taking full advantage of it so, starting point... bare pw πŸ™‚ have a nice day
  8. Hi, well actually, as when displaying breadcrums i use <?php foreach($page->parents() as $parent): ?> i think that while looping through the parents array, something like <?php foreach($page->parents() as $pid => $parent) { $position = $pid + 1; //except if you want your position starting by 0 } ?> would do the job $pid being different from $parent->id of course hope it may help πŸ™‚ have a nice day
  9. well, if you restrain the template access it won't be proposed to add/edit a page and a user who hs obnly access to certain templates/pages don't have access at all Γ  the templates, this is a supreadmin feautre πŸ™‚ have a look when logged as a non superadmin user
  10. Hi Ana, depending on what you need i would say yes πŸ™‚ in the access tab of the template if you check the yes radio button, you will see the roles you've created and will be able to easily choose which one can have access to the pages using this template, job done πŸ™‚ have a nice day
  11. +1 with @adrian and If chmod is disabled for so-called security reasons, huge doubts arise about the rest of the servers' security...
  12. Hi again πŸ™‚ well, honestly, why not but actually it's up to you in the tem)plate file to fill the alt attribute with the page (or article or whatever it is) title if the image description is left empty and that is exaclty a good example of where the field descrription can be used to emphasise the "do not not forget to fill the image description" explaining while, well of course execpt if you do not trust at all your users... i do'nt know how nor by whom the website will be filled πŸ™‚ have a nice day
  13. Hi @perplexed ah ok, i thought you were using special fields (tag/text and so on) for you rimage field, then i was thinking it would be easy just to put some strong and color in the description of the image field telling there are details you don't see but don't forget to edit those images and then fill those not visible fields for eaxmple i do this kind of thing when i use @horst croppableimage3 module to remind my victims that when adding an image to this field, you don't see it working but it generates a cropped variation and you can modify the framing to your taste thus don't be mad if you don't lke the result πŸ˜„ have a nice day
  14. Hi @perplexed actually,in may cases thet' where the field description is very usefull and more, you could use a nice red strong to remind your user they have to fill something special thie module by @adrian will help you emphasise the part of the description you don't want your user to miss https://processwire.com/modules/dynamic-description-notes/ honestly, i don't know how far you are in your wensite dev but i would bet this is something you would regret as soon as you need one of the great image crop modules... (i can't think of one of the many xebsites i've made with pw that don't use at least one of them...) πŸ™‚ have a nice day
  15. Hi @Dillon if this is the kind of thing you're looking for https://www.waitandcie.com/ sorry everything is in french but it doesn't change the way it works... first i get the pages like this <?php namespace ProcessWire; $zipages = $pages->find('parent=1, sort=sort'); ?><!DOCTYPE html> and then <nav aria-expanded="false" inert> <a href="#" role="button" class="close_nav" id="close_nav" aria-controls="nav" aria-expanded="true" title="fermer le menu"><img src="/site/assets/img/couverts.svg" alt="fermer le menu" aria-labelledby="fermer le menu" style="width: 40px;" /></a> <ul id="navul"> <li><a href="/"><span data-content="Accueil"><img src="/site/assets/img/back.svg" alt="retour Γ  l'accueil" aria-labelledby="retour Γ  l'accueil" style="width: 50px; margin-inline: auto;" /></span></a></li> <?php foreach($zipages as $zp): ?> <li><a href="<?= $zp->url; ?>" class="navlink<?= $page->id == $zp->id ? ' selected': ''; ?>"><span data-content="<?= $zp->title; ?>"><?= $zp->title; ?></span></a></li> <?php endforeach; ?> </ul> </nav> and of course, alittle lower <a href="#" role="button" class="open_nav" id="open_nav" aria-controls="nav" aria-expanded="false" title="ouvrir le menu"><img src="/site/assets/img/hamburger_wh.svg" alt="ouvrir le menu" aria-labelledby="ouvrir Γ  l'accueil" style="width: 50px;" /></a> done... everything elese is about css and js (toggle the inert and aria expanded attributes, my little fun with the menu items and so on but, as you can see, there are svg files here and there, when they are used all over the website UI i often create an img folder in the assets one to store svg icons (hamburger/map markers and so on) in case it helps a little have a nice day
Γ—
Γ—
  • Create New...