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. After creating fields and assigning to a template, I added pages with the template. All good. At one point, I had an admin edit page open to view the data and the template configuration in another browser tab to check the field names as I was coding the layout offline. I edited the page and submitted. I then viewed the front end page in another browser tab which showed nothing? Went back to the template config tab and refreshed it. All 35 x fields, including the title field were dropped from the template!!! I checked in phpMyAdmin and my custom fields were all there with, eg land_measurement: {"inputfieldClass":"InputfieldSelect","tags":"property","collapsed":0,"send_templates":[41],"showIf":"land_area!=''","columnWidth":80} where [41] matched my template id. Everything else in the template configuration was correct. What happened to the field assignments in the template? How can I recover them without having to reconstruct the template? More importantly, what caused this behaviour so I can avoid it in the future? Using: PW 2.6.1 Apache version 2.2.29 PHP version 5.4.40 MySQL version 5.5.42-37.1-log PS: I also had a template lose its fields on another site running an earlier PW version on a different host. Any ideas? TIA
  2. Hello everyone, Been working rough 5-6 months with this beast and i gotta tell you that it's almost perfect Of course every software has it's ups and downs, just like life does and nothing is perfect or meant for everyone, but here we go... I think database structure is about correct and flexible enough, what i don't like is that i can have similar field with 3x different prefix just because i need different control data for that same field. How about if template would control fields data instead of field? Field could have it's own control data as default, but i would really like to see that template could at least control some data, like visibility, appearance, required, stuff like this. Why? Because past 5-6 months i faced fact that for example when i need to custom admin interface for some template i would like to use same field over and over again, but it's kind of impossible when width can be 50%, 33% or 100% for different templates, data how ever is very same. Feels so stupid to create field over and over again, when it could use existing database tables. You already have control tables for fields and data tables separated, which is good model, so how big deal would this to be to implement something like this? If this already exists and i'm blind, lemme know and i'll buy you beer I hope i'm not the only one feeling like this, cheers for listening
  3. Hello! I often have to change image sizes in templates using the ->width() or size functions and on a image heavy site this a cause timeout errors or massie lag before all the images are resized when changing to the new template. I was wondering if there was a good way of creating these images without having to hit each page on the site for the template to be called and images updated? Basically to avoid the errors? Thanks
  4. Hi, I wanted to know if Processwire allows for Sub-Templates? Example would be if I have a content heavy template, i'd be able to showcase content on various sub-templates of that page. So mysite.com/bio would be the main page, and if I wanted to a specific piece of content on a page by itself, I'd have a sub-template with mysite.com/bio/location Hopefully that makes sense. Thanks!
  5. Would it be possible to configure a different path to the templates for different users/roles? E.g. for the user admin the templates reside in the folder /site/dev-templates/ and for all others users the templates lie in the folder /site/templates/? With this, you could have a production-version of your templates and when logging in as a special user you can work on your development-version simultaneously. Maybe there could be a function to check-in ready templates to the production-version.
  6. I just noticed that the added items in/under "Add New" are sorted by their template-name. As you can see, on the screenshot below, these "names" differ sometimes to their "labels". Kategorie => category Artikel => post Schlagwort => tag For such kind of cases, it would reallynice if we could sort them manually. That we can sort them by their labels or what ever... Artikel => post Kategorie => category Schlagwort => tag As surprising pw is, this is already possible, somehow?
  7. Hi all. I have pages (templates) that are only accessible to certain users. Now I need to get all users that have view access to specific pages (they will get email when page updates). I thought of something like this: $template = wire('templates')->get($p->template); $roles = $template->getRoles(); $users = wire('pages')->find('template=user, roles=' . $roles); But it looks like getRoles() doesn't returns the roles for that template. Roles is an empty PageArray. What is wrong or is there another way to get those users?
  8. Is there a somewhat comprehensive guide or tutorial somewhere on theming the PW admin? There's so much untapped potential there I just don't know really where to start to learn my way around it. If not, would anyone care to create one? I know I would greatly appreciate it, as would many more users. There are no admin themes in the modules directory currently that claim to be compatible with 2.5. That would probably change with a solid beginner's guide.
  9. Hi! I am building a site where there is another user-template as introduced in 2.5.14. (http://processwire.com/blog/posts/processwire-core-updates-2.5.14/#multiple-templates-or-parents-for-users) For now, you have to add the parents of the users with the new user-template manually like so: $config->usersPageIDs = array(29, 1026, 1027); But I have dynamically growing pages which hold the new users, like so: Home Members Group User User Group User User ... ... Ryan mentioned they're working on automating that process, but I wonder how I could accomplish this now. Naively I tried to fetch the parents like so, directly in config.php: (I'm quite novice ) $those_pages = $pages->find("template=that_template"); But that failed - nothing got rendered. Then, I thought I could do that in the site template files. But that would be too late, I guess? Also this approach would be useless for the backend... and I guess I don't need this configuration for the fronted anyway!? Now I wonder where would be the right hook to some function in the right time to accomplish this? Or any other solution? Hope you get what I mean ...
  10. I'm working with a PW 2.5.3 install. Here http://processwire.com/blog/posts/processwire-core-updates-2.5.14/ there is a quick tutorial on setting up an alternate user template and parent. I followed it to the T, but it didn't work; when adding a new user, there was no choice of template, and once the user was created the alternate template I had set wasn't even among the select options. Has anyone managed to do this or even just an alternate template successfully? The alt. tpl. is what I rly. need... I just tried it twice over and then erased and undid everything 2x too, so... Then I only unchecked "Don't allow pages to change their template?", cloned user template (id=75), added "$config->userTemplateIDs = array(3, 75);" to config.php created a new user No alternate template option still. This should be able to work right? Because I don't see a date for that blog post but do only see comments from 5 days ago, but it says 2.5.13, I'm using 2.5.3.
  11. I want to give Twig a try for creating template pages. How do i start ? Use TemplateTwigReplace or TemplateEngineFactory (with TemplateEngineTwig) ? My main concern is to be able to use the AOIM in my templates. Do I have to use TemplateDataProviders as well ? Any guidance is welcome. Thanks
  12. Hello. I'd like to clarify something that's in the back of my mind for a while. If i have 10 fields with the same parameters, except only the labels, for example scatered in different templates, i must have 10 different copies of those unique fields?
  13. Hey guys, Was just interested in your different techniques for sending HTML emails through your templates. More specifically, where you store your email codes? In the past, using smaller, simpler emails I was "OKish" with keeping all the HTML garbled in my form processing at the top of a page but am thinking there must be better ways surely? Do you use includes? ProcessWire templates? Just interested in seeing your different techniques.
  14. Hello ppl I'm trying to create an image banner to show in all pages of the site, and for this i created a page to hold multiple images in a field (latter im gonna deal with animating them). The page is published, So this is the tree of values i got: i can address the page with $pg_settings = $pages->get('name=settings'); it seem to be correct because print_r gets me a biiiig array if info now the problem is getting the array of images, with their respective url's. I tried: $pg_settings = $pages->get('name=settings'); // echo "<br />pg_settings: " . print_r($pg_settings->get("banners_slideshow")); // seems ok... $imgs = $pg_settings->get("banners_slideshow"); print_r($imgs[0]->get("url")); // i got nothing?? In this page i also have a non repeatable image field for the logo, so i think i cant use the images array from that page. the question remains: how do i address a field with multiples images, that is in another page? thanks for the patience!
  15. The first time you create a field, there is an info tab which says This field is not currently in use by any templates. It would be real time saving at that point to select the Templates which can use the new field. Otherwise we have to save the field ... browse to Templates ... find your template ...click it and add and reorder it there.
  16. In this post we had a small discussion about making PW more userfriendly(for new, non developer users) https://processwire.com/talk/topic/7184-lets-highlight-processwires-ability-to-be-an-enterprise-cms/page-2 Personally i think the technical details belong to another thread, so i opened one. When you install PW you got basic pages and nothing else at least from the view of a newcomer that is not a developer. What does a newcomer expect from something that is propagated as being better than WP? Basic pages whith more than body and titl. At least they need title, browser title, meta description, publish date controll, a main image, image uploadfield for images in the MCE editor, short text, long text(Tiny MCE), tags, optinally a small gallery for additional images(whith lightbox), an easy option for comments. A basic Blog/News system as news and blog can easily be used interchangeably. Image cropping on default image fields. Premade RSS feed. Premade sitemap. Premade search. A basic form module An Image gallery with mass upload, description,title, title tag, alt tag, fancybox option. A Template system for easy template change and an option for modules to link in Module installers that are able to deinstall a module completely.(for example the blog module does not) Site settings and maybe Template settings Simply install and go. The interesting part is that almost everything from this list is already there in PW. A few words about PW in general. Im my opinion PW is not a CMS, at least not now. Its a CMF whith an extra comfortable backend , and it really schould be advertised as that right now. Many of the stuff that pepole expect from a CMS is not present (installable templates, modules, calenders...) it has to be build by yourself. Even if thats pretty easy to do, its not click install and go. So its a framework and not a CMS. Ok, let's look at the reality of most CMS. Either they got far to many modules or they do not have enough modules. Many modules are unmaintained or broken or lack some important functionality. Often installation of any module or updating the CMS breaks a lot of things. even paid modules often come whith lots of problems inside plus you literally have to test hundreds of modules before you find a combination that is functional, compatible and affordable. So from this point of view PW is even better than any CMS, as almost all stuff is build with plain core functionality, but still its a framework not easy to understand by a user. So what do we need to make it a CMS? The keyword is standarisation. An user does not want 100 ways to make a news page, he exactly wants 1 way to do that. Its great if you easily add some fields but basically he just wants a news page. Standarisation does not need to take away freedom, it only allows to make components that interact in certain defined ways. Standarisation can never be perfect but it can help alot in interaction between different parts. If we look at PW templates there are endless ways to get the result you want so its almost impossible to make a module that creates at least a halfway decent looking default template for its functionality that links into the basic site structure. Would it be bad to create a standrard way for making templates that allows modules to link in ? Would it be bat to have a bunch of default modules that allow templatebuilders to produce templates that already have a well made formating at least for this few modules. You still have the option to do it the way you like, you can build your own stuff or just modify the existing stuff but in addition to that you now got the option of installing a few modules, buy a template, do a few modifications and you page is ready. So it even adds more freedom to the system not less. Lets take a look at WP. Most templates only support the basic blog and maybe a few modules. as soon as you start to install additional modules you either have to live whith an often ugly default output and often it fails completely. So you start modifying the template or even worse you need to modify the module. The next module update kills all your changes and you have to start over.... The fun starts if you have a bunch of modules that need modification . A big company called Templatemonster has a solution for that problem. They sell WP themes that are a complete installation bundled with all the necessary modules and all addons fully functional, but don't try to upgrade the WP system, simply don't do this. Maybe this is the perfect way for PW to make premade templates ? I guess not. You still run into trouble if you want to change the look of your page. But still it may be an idea to earn some money whith PW. at least i would pay for a nice installation package whith blog and gallery and a really nice modern template with some color, background and logo control in the backend. For the easy creation o something like that we would need an extended Profile Module that allows to store a complete page as an installlable Profile. Right now i had some trouble storing multilanguage support and pre generated user and a few other things. So i guess the best way would be to define a bunch of standard modules, define a default way to do templating and for interaction between modules and templates. More about that tomorrow(more technical details ), i need a bed right now
  17. When creating or adding a new template I'd like a short template description field. That template description should then also be visible when choosing a template for a page. If you've a lot of templates, it gives editors some asseurance that the template they are selecting is the correct one.
  18. Hi, I was reading a very interesting post in this forum (https://processwire.com/talk/topic/7166-wp-tavern-article-and-processwire-themes/page-4), about PW and its popularity compared to other cms like Wordpress. The key point that has been discussing is: how can PW be more attractive to non developers (ie designers)? (ok here another question arises "Do we want that PW reach an audience bigger that developers only?" but this is another topic...) Wordpress for example has a theming system that certainly is very attractive and quite easy to use, and I noticed someone in the community is already working on a module that could do some steps in that direction. That could be great but there's another thing that in my opinion could help very much: an automatic template file generator. Let me explain... I think that one of the things that scares a person which is not a developer the first time he uses PW, is the fact that after creating some fields and a template that contains these fields from the administration panel, he has to create a new empty file named as the template and put it inside the templates folder. Obviously from a developer point of view this is not a big problem, I go searching the docs and try to find what to put in this file, but from the point of view of a person that has no the developer mental scheme that thing could be scary at the beginning, and I imagine that if this person is trying out a lot of cms to find out which is better for him, he could easily think "ah dawn this is too complicated for me!". Ok, so what if I can, after creating a template, press a button and let the system create the template files for me? This could be great! I can now go to PW tree page, add a page with the template I created before and when I navigate the site I have already a page that is working, and it also outputs the fields that I filled! Then, I go editing the template file that has been created automatically and change the html as I prefer, but I don't have to bother about php code at all... The next step is thinking about a small wizard that create the file when I press the generator button: for example I have to choose if I am creating a simple detail template or a list template. In case of the list maybe we need the user to enter some filter parameters to generate the array list (template type, parent, etc.) and so on... So, this is not a trivial task but maybe not even impossible. In the future you can also think about a way to make this module useful even for developers, for example creating some template for outputting the html of the template files.... But maybe I am going too far So basically I think it could be very interesting to create a module that adds this functionality to PW... What do you think?
  19. Hi all, I am quite new to PW, and I am starting to create my first modules. In a site I am working on, I have already created some templates, fields and pages to manage a simple event management, with event list page, event detail page, list of categories, and so on. Now I would like to put all this inside a module, so when I start a new site all I have to do is install the module and I am ready to work with the events. I already understood how to create the module and do the installation (and uninstallation of course) of templates, fields and pages, but now I am wondering what's the best way to manage the template files (.php) that the module pages will use. I noticed others have chosen to copy the needed templates files inside the "site/templates" directory during the installation of the module... Do you think this is the best approach? Are there any alternatives? I am not fully convinced since this way I am adding new files to "site/templates" folder and since this folder could already contain a lot of files the situation could become a litte messy (since I have a mix of files I created and files that a module created). If this is the right way to do it, I am wondering if in PW there is a way to use subfolders inside the "site/templates" folder, I am thinking for example to have a subfolder named as the module name, so all templates .php files related to that module could stay here, in a more organized way. Thank you for a feedback on this! enrico
  20. Hi there, Is there a way to get: foreach($templates as $template){ $options.= "<li>{$template->name}</li>"; } to work for a selectbox inside "getModuleConfigInputfields"? i am implementing a module which hooks after page->save. i need the Values (Parent Template, Child Template, Child number, Child name) to be set. I would rather do this with a selectbox of all Templates then with a Textfield. idea behind this is that a customer should be able create a page and gets always the same amount of children inside the page, which should be configurable on the module, because i need this similar tool already 3 times. thanks for every help
  21. Hi altogether, since I am currently working on a project that has (hopefully) the potential to reach a certain level of complexity at some point, I wanted to start the template structure in a scalable and "proper" way. In the following I'll try to give a summary about the approach I'm testing: 1. Directory structure inside site/templates/ /controllers/ /views/ 2. Create init file named... site/templates/init.php...containing (for example): <?php function getPartial($name, $allpages) { // Site wide $settings = $allpages->get('/meta/settings'); $root = $allpages->get('/'); // User related $loggedInUser = wire('user')->isLoggedin(); // Page related $title = wire('page')->title; $children = wire('page')->children; $template = wire('page')->template; include($config->urls->templates . 'controllers/' . $name . '.php'); include($config->urls->templates . 'views/' . $name . '.php'); } 3. Uncommenting prepandTemplatefile in /site/config $config->prependTemplateFile = 'init.php'; 4. Creation of partial (controller and view) in their respective folders /site/templates/controllers/test-partial.php /site/templates/views/test-partial.php Example controller: <?php $homepagetitle = $root->title; Example view: <h1><?= $homepagetitle ?></h1> <p><?= $title ?></p> 5. Creation of layout file. I tried to put these in a folder called /layouts, but that does results in PW not finding new templates anymore in the PW Admin when creating a new templates. Any ideas? Changing index.php's $config->urls->templates ? Example layout: <html> <head> <title>Foo</title> </head> <body> <?php getPartial('test-partial', $pages); ?> </body> </html> So, for some reason I have to explicitly inject $pages or wire('pages') into getPartial() - but I have no idea why, since $page or wire('page') is working without problems in the functions scope. But: The output is just as intended. The title of the root page in a h1 headline, and the title of the page using this "layout" in a paragraph. Any feedback or pointing to pitfalls of this approach would be highly appreciated Best, marcus edit: Funny, essentially this is a very stripped down way of Template Data Providers, which needed Twig the last time I tried to use it.
  22. I have copied over the templates-admin folder into the site folder, however, my admin template never changes. Any idea what could be wrong?
  23. Basically, I created a site for a client that is a marketing and advertising site for personal ads. The site is intended to allow a user to view the site and if the user wants to post a personal ad to promote their services such as music performing, dancing etc. they can for a small fee. (It's pretty much like back page.com and craigslist.com without the ugly design. More focused to look like a website, with 1 page personal ads.) Currently the site is using the latest Processwire release on Foundation framework. I have users coming to the site and if they decide to post, they click on a link located on the bottom that says post new profile. Once clicked, they arrive to a page that has a form builder embedded form. I am using form builder forms to process the user information and create a new page under the category of their choice. This is working and creates pages quickly for anyone that wants to post an ad. (I was advised not to use this method but due to lack of time, I had to run with Form Builder.) Here is what the system does now: Once a user completes the form, they submit the data and the page is automatically created. The user receives an auto response email with a message asking them to make a payment via a link contained in the auto response email. The link goes to a paypal subscription. Once the paypal subscription is paid, we are manually sending the user a user name and password to manage their page through a front end editor that we setup in Processwire. If they do not pay in 24 hours, we manually delete the page. As far as spam goes, we only have the spam filter enabled on the forms with the turing test question and answer. Here is what I need the system to do: I need help setting up a way to ask for a credit card first, then process the card for the payment, then post the page. I also need help redirecting the user to the newly created page after they have submitted the data through the form builder form. I also need a way to automatically create a user and password and assign it to the newly created page. I am up for any suggestions and welcome all of your input. I would like to essentially make this an automatic type thing. Where all we are doing is checking to make sure things work. Versus manually adding users, manually deleting pages etc. I AM OPEN TO ANY SUGGESTIONS ADVICE, ASSISTANCE ETC. Feel free to PM me as well. If a heavily experienced user feels that they can accomplish this build another method via API etc. please provide some guidance. Again, thanks so much to everyone in this community that has enabled me to learn more, create great things and accomplish tasks, Processwire is truly amazing!
  24. Is it somehow possible to let page->render() use global variables? I want to render subpages in a template, which works fine for some cases. The problem: In the template there is an include, depending on a variable, which is set in the header. in the first head/ first template: $mobile = true; foreach($landingpage->children as $child) { echo $pages->get($child->id)->render(); } and in the template: include_once("./header.php"); if ($isMobile) {include("./mobile.inc");} but page->render() will (of course) not recognize the unknown $mobile variable. is there a way to render the page with all its variables? Best, Jan
  25. Is there a way to set a default value in the editing interface for a Field? For instance, for a Text, Integer or Page field used in a Template. For example, lets say I have a template called Songs with the field Length. Length has default value 3:00 (minutes). When I create a new Song Page, the Length field should appear pre-populated in the editing interface with the "3:00" default value.
×
×
  • Create New...