Jump to content

Search the Community

Showing results for tags 'templates'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now. Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead. Add Template Enhancements A module for ProcessWire CMS/CMF. Adds some efficiency enhancements when adding or cloning templates via admin. Features Derive label from name when new template added: if you like to give each of your templates a label then this feature can save some time. The label can be added automatically when templates are added in admin, in admin/API, or not at all. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage Install the Add Template Enhancements module. Configure the module settings according to what suits you. https://github.com/Toutouwai/AddTemplateEnhancements https://modules.processwire.com/modules/add-template-enhancements/
  2. I am making a website where on multiple pages i would like to have swappable customisable 'widget's or cms editable areas. Can anyone suggest how to implement a good visual way of doing this? (eg. Like the repeater field but each entry is an inline editable widget)
  3. Hello everyone! It's been a while since I've posted on here, but I've got an issue that I haven't been able to solve by searching through old posts. I'm trying to allow a user to change templates on only two pages of their site. I've enabled page-edit and checked the box for page-template. When I log in as the user role, the template dropdown works, but it only shows the current template and no others. I'm using version 3.0.39 if that makes any difference. I'm stumped. Thanks in advance for your help and suggestions! They are much appreciated.
  4. Hello! I am using ProcessWire for a good three years now already, and I am really happy with the flexibility it provides. There is one thing though that bugs me. For a recent project, I need lots of templates. I already have a site/templates folder polluted with a package.json, yarn.lock, node_modules, errors, .eslintrc, .git and my entire build setup. And I thought: OK - when I am forced to use site/templates for templates, is it actually correct to put all my javascript, styles, components, functions, classes also there? I mean, at least this is what the default theme encourages (they put styles there also) I read into other posts covering this topic about having a sub folder for templates. Because even with the non-template files stored somewhere else, the template files are still too many. Unfortunately, they also discovered that this is not possible: Sub Directories for Templates Should all template files put under site/templates folder What are your ideas? I already thought about having a page field, that defines the template path from a dropdown, but with this I would only reinvent an already almost working wheel. Thank you for your inspiration. Best, Martin
  5. Hi everyone, I'd like to start a conversation about your view and practices for profitable web design and development (unless there is already one that I didn't find). I use ProcessWire for most of my sites currently. Wherever I look though I can see plenty of web design freelancers and even larger agencies running exclusively on WordPress and themes. Many people are running "web design" businesses even without any development skills. There are just so many that I started to doubt if that's the way to go. - Do you use Wordpress + themes to cut cost and increase your bottom line? If yes, what is the middle ground? Is it worth to put up with WP? - If not, what alternatives you use for micro/small businesses? - And finally, how do you use ProcessWire to speed up small, basic brochure websites? Clients care more about budget and results than "custom" design. I love working with ProcessWire but only if it doesn't mean lost opportunities. Any opinions are welcome, especially from those of you who are advocates for themes yet are skilled developers.
  6. Hello Forum members. I just wanted to confirm with you PW gurus on here that i got the thinking behind regions in the latest blog post right: https://processwire.com/blog/posts/processwire-3.0.49-introduces-a-new-template-file-strategy/ So my understanding from the quick glance of the article is that if i were to use the new regions functionality it would in simple terms work like this: The referenced HTML in any of my other page template files would be inserted at the designated place in the home.php template file instead of replace it with all HTML in that page template file that was requested ? And the home.php template file would become sort of a View, that used HTML from the other templates files to change acording to the needs? So that i would only need to put the HTML that changed in my other page template files and have the "full" HTML markup in the home.php ? I just wanted to see if i got it right. Thx in advance. ProcessWire Official Markup Regions Documentation (New 2022-09-08) https://processwire.com/docs/front-end/output/markup-regions/
  7. Hi, I was just playing around with the Repeater fieldtype and wondered if this might be a good fit for something I would call a "FieldCollection". In a FieldCollection the behavior should be exactly the same as in a Repeater fieldtype where minimum and maximum items are set to "1" – just the look and feel in the backend should be slightly different. Think of templates that share two or more fields for the exact same reason – e.g. a "published from" and a "published to" date field and a checkbox. Instead of adding those three fields to every template that needs them, why not create a FieldCollection? Changing the FieldCollection will change the fields on every page it is added to. The only caveat of using a Repeater item set to min and max 1 item is its appearance in the backend: Some of the Repeater features (delete item, add new item, ...) wouldn't be needed for that particular usecase. What do you think? Many greetings! Nik
  8. I need some help in understanding how filters work with PW pages and templates. I need to convert this HTML template to PW. Here is a working example. That specific page is giving me nightmares. What I think I know so far: the front-end doesn't bother me, I have that covered each single hotel page has its features/facilities/characteristics those features/facilities/characteristics should be in the single-hotel template a hotel index listing template should be created to hold an index of all the hotels(paginated) Now, do I need a sidebar template to hold the PHP logic of the filter or is that part of the hotel index?
  9. When you start a website from scratch and have to make both front-end and back-end of it, how do you set up your workflow? I’m a bit confused because 1) I’m new to PW 2) I’m setting up a marketplace where the vendors need to have access to the back-end, so they can manage their services/products, which will be listed in the front-end for “normal” users to buy them. More beginners' questions: What do you do first the back-end or the front-end? Is it correct to think of fields -> pages -> templates in this order? If yes/no why? Is the product page that the "normal" user see in the front-end, the same that the vendors have access in the back-end? Thanks!
  10. think i've got myself into a muddle here but i've got each template as a section in my homepage, when I go to each page they work fine (as they wrap the _main page content after), but on the homepage template I want to get all children and rendren the retun from JUST the template itself i.e. getting all the $content returns. Any way of doing this, not somthing I would normally do, just don't want to basically replicate each template into my homepag template as they may go out of sync. Thanks
  11. Hi all. I'm creating module and it needs to create some actions in admin panel to work correct. So it would be great if somebody tell my how to do some things below using api (___install() method): create fields put fields to template Thanks
  12. I have a situation where a pagearray appears to lose its sort order. 1. template xyzzy.php fetches a pagearray with code similar to: // in an external include file function get_pages($selector) { $found = wire('pages')->find($selector); wire('log')->save('fubar', count($found)); return $found; } // in the template xyzzy $pa = get_pages($some_selector); $pa->sort('-timestamp'); 2. main.inc is appended to the template. in main.inc an additional file is included, './layouts/xyzzy.php' 3. './layouts/xyzzy.php' then references $pa as such: <? foreach($pa as $p): ?> // do stuff with $p // log for debugging wire('log')->save('xyzzy', $p->name); <? endforeach ?> 4. The $pa that './xyzzy.php' sees is sorted while the $pa that './layouts/xyzzy.php' sees is NOT sorted. It seems like the PageArray/WireArray got copied at some point but the './layouts/xyzzy.php' file shouldn't have been included until 'main.inc' is appended. What am I missing?
  13. Hi Forum, we moved an installation from the live server to localhost for further development. Unfortunately now PW doesn't find files in the /templates/ directory anymore (e.g. css, js and so on). Functions testing for existing files abort with an error and the console throws 404 for the files in question. Two developers have checked (so far several times): site/config.php $config->httpHosts .htaccess file permissions on /templates/ and all subdirectories (set to 777 just to be on the safe side) our own php functions Our version is 3.0.22 devns. We are running out of ideas. Any help is appreciated. Thanks.
  14. Hello folks I made this simple tutorial of explaining my methodology when creating a PW system. https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a4#.osipvjevk
  15. Hi, I have been running a processwire based film magazine for more than 3 years now. The resources are wonderful, and the forums are full of information so much so that I did not have to ask a single question during the design process or later. I just added it in the showcase section when the site was done. http://projectorhead.in But in the last week I have been facing some real trouble and the forums dont seem to have anything related. The problem; Once in the admin section, I cannot publish any new content, pages that have some exisiting content, dont accept anything. If I wish to update module settings/ install or uninstall any new module, it does not work either. Every click on any button meant to achieve something in the admin leads to a 404 error in the front end. It started from one page but now nothing would change in the admin, it feels like it has become a hard ball of metal which would just not move. The attempts; 1. I upgraded the entire installation, thinking it was due to the outdated version. I am running the latest stable, 2.7.2, php version 5.6 2. I turned on the debug in config.php, it threw some notices and warnings, have fixed all barring one, where imagesize wants another variable, it hasnt created any issue in the past. 3. I cleared up all caches using the filemanager, removing cache files. Since the backend will not let me purge caches, I had to use the file manager. 4. I cleared the cache table from the phpmyadmin. 5. ProcessImageMinimize was throwing up errors, so I removed the calls from the template and deleted the module using file manager. 6. Saw some suggestion about the .htaccess rules, played around and nothing worked, however the .htaccess is being duly read and used by the server. I am out of options and having to stall the latest issue of our magazine, would really appreciate some quick help on what else I could try, possible solutions etc. I hope I have described the problem sufficiently, but if you need any more details, please ask. Best.
  16. Hello Fellow PW users and fans. I have a simple question that needs an answer. Have been working on a pretty complex site know for a while and lots of template files. So i was wondering if i could for sake of keeping everything organized could sort my template files in sub directorys and still have PW recognize these template files and find them when needed ? Or do i have to keep them all in the same "template" dir. I know how to use include() and all that. So thats not what i am after. Because i would like to distinguish my main template files and some that are experimental and possibly not going to be used in the finished site. And there getting to be alot of them at this point and at times a bit confusing to distinguish them. Well there you have it. thanks in advance.
  17. I see it's possible to Export and Import data from the Templates and Fields panels. Awesome. Is it possible to configure these settings in a text file or files that live in the site directory? The /site/templates directory already contains PHP files for each template, but they don't cover the template and field metadata that one configures using the ProcessWire admin panels.
  18. Hi all, I just wanted to find out how Processwire developers manages their templates and components/partials these days. Are you guys using spex/twig/template data providers or just plain processwire setup? Below is my setup: - Using Spex which can be found here: http://modules.processwire.com/modules/spex/ - partials/components are stored within these folders /site/templates/partials (Spex design by default) - there are options to set different base using using Spex - templates are built by outputting these partials/components - the rest of the setup is easier to read from Spex readme file rather than me trying to explain in it here. - php short tags whenever possible. Here are some screenshots: So far so good with Spex setup and I quiet like it however, Spex has not been updated for quiet sometime now and not sure if this module is going to support version PW version 3 moving forward. In the past, I've used Twig template engine (http://modules.processwire.com/modules/template-engine-twig/) created by wanze but not really compatible with Procache module which is a deal breaker for me but it works really well if you don't need Procache support. I understand the same topics have been brought up couple of times in the past (feel free to close this down if required) but I thought I brought up the same discussion again to get some new and cool ideas how to manage templates to make your life easier as Processwire developers. Many thanks!
  19. I am coming up close to when I need to move over my local branch to the live site and was wondering is it actually possible to move the templates (with assigned fields) over to the new site without having to reassign the fields? I know I can backup/import the fields themselves, but I have 78 fields assigned between 2 templates that would be a pain to "redo". Thanks again for all the help everyone. I am loving processwire thus far.
  20. For my event template I have tried setting the Name format for children as title and date, respectively, as those are the only two I've ever gotten to work with that. So I do have a small module that renames them before save, to Y-m-d-title, but I can't manage to get adding an event from the admin the standard way to skip the Page Add step with the Title and Name generation. Not only that but it always displays the warnings for Name Already taken, which I don't want, as they're organized by date... Admin users don't need to see "The name entered is already in use. If you do not modify it, the name will be made unique automatically after you save.". How can I bypass this? Thanks.
  21. I've abstracted all of my templating to the point that the files at /site/templates/[template_name].php are completely empty. Is there any way to get rid of the need for the empty template file and still have processwire's built-in routing work as expected? Thanks! Jason
  22. Hello, I've tried to search the forum for this but so far no luck so I decided to post this in wishlist section. Under the Templates/Permissions, there is an option to redirect the user to a certain URL when he is not permitted to view the page. However, this is a pure text input and it's really difficult in the case where I would like to choose to redirect user to a certain page. The page might have multiple URL (multiple languages) or the url might be changed later by the user so a static URL redirection here is no good. Have a nice day.
  23. I only stumbled across WP a few weeks ago, but have already been able to accomplish far more than over months spent banging my head against the baroque code of several shall-remain-nameless frameworks. I could weep thinking of how much time I have wasted elsewhere. I have, however, hit a speed bump--possibly due to the fact that I am still a bit shaky on how templates interact. My set-up (a sample travel site): Places Place1 see poi1 poi2 do poi3 poi4 sleep poi5 plan poi6 Place2 see poi7 do... Interests Interest1 Interest2 Interest3... "Interests” act a bit like tags assigned to the "poi"s (this is an internal tagging system, open to admin only; no free tags/users cannot assign). For the record, that odd "poi" nomenclature stands for "point of interest" (as a unique name, it's handier than using something vague like "item"). (Aside: Yes, I realize "see, do, etc." could exist instead as a third "Categories" tree. I fiddled with that, but in the end figured I'd just use the already powerful and straightforward parent/child nesting format of pages that PW provides. Also [ahem], I couldn’t get urlSegments to work; another time.) A simple foreach loop on my _main.php page creates a link-list of the Interests assigned to a given poi. <?php foreach ($page->interests as $i) { echo "<li><a href='{$i->url}'>{$i->title}</a></li>"; } ?> When you click on these generated links, it takes you to the appropriate "Interest" page, populated by all POIs assigned that Interest. Here is the relevant part of my Interest.php code: $int = $page->id; $pois = $pages->find("template=poi, interests=$int"); $content .= renderNav($pois); Problem: I do not want to see _all_ the POIs assigned that Interest. I need to limit it to other POIs in this particular Place (the grandparent of the referring POI). In other words, I only want to see other "Museums" (interest) in London, not those in Bath, Manchester, and Oxford as well. This is easy to do in absolute terms (I can limit to "has_parent=London" or something); but I need it to be some kind of $place variable instead, one assigned by the referring POI. For the life of me, I cannot figure out what code to use and where to stick it--in the foreach loop of the poi.php page? On the "Interests" template page? In short, how does this variable (the "Place" grandparent of a given POI) get assigned to the link and hence carry over to be able to be used in the functions being applied by another template (Interests)? I suspect the answer is so glaringly obvious only an interactivity noob like me would not know. That would explain why I canot seem to find the answer after a solid week of trolling every forum thread, tutorial, and wiki at PW. While I’ve built my own static HTML sites for 20 years (wow, that seems long; anyone else remember dividing text blocks with HRs, or the glorious day HTML3 finally allowed us to align GIFs so text could actually flow around them?) I am only a journeyman at PHP and MySQL. I've never even created a form. I know. Shameful. Thanks for your help.
  24. I've started a processwire project from a blank project. for some reason when I open my browser the page opened is not the "home.php" page, but the "basic-page.php" template. I've checked and my home page is set to use the 'home' template and not the 'basic-page' template. How do I change that?
  25. I'm trying to hide some of the pages on my website from users that are not logged in. I'm trying to achieve this by changing the settings of the page's template like so: This hides the page from my navigation which is good, but it doesn't block the user from surfing to the page directly which I think should be happening if I interpret the settings correctly? When I first encountered this issue I was running PW 2.6 but I've since updated to 2.6.8 alas to no avail. I hope someone will be able to help me out and I will be happy to provide more information about this issue if need be. I'm currently working around this issue by adding a $user->isLoggedin() include to my pages but this isn't as clean as setting the permissions directly from the CMS imo.
×
×
  • Create New...