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. I have copied over the templates-admin folder into the site folder, however, my admin template never changes. Any idea what could be wrong?
  2. 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!
  3. 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.
  4. I've played with ProcessWire on localhost, and now I'm trying to get it running on a live server. It installed OK, I can log in, add pages and templates, and add new fields, but I can't view template fields, even for basic-page. All I get is an empty space between the Edit Template:basic-page and the Save button. See screnshot I checked the core....there are three files Template, TemplateFile and Templates. that all look OK. Other than that guess I haven't a clue what to look for. (I'm hoping that ProcessWire will help me develop some php skills). Does anyone have any ideas what the problem might be?
  5. Hi all, I always create a few templates that do not have a template file. For example, a lot of times I create a "testimonials" page that displays all it's "testimonial" children. But I never want the users of the website to navigate to a single testimonial. I on'y want to list out the testimonials on the "Testimonials" page and store the individual testimonials as children of this page. I never ever want the individual testimonials to be visible. As it stands, if you were to try to visit an individual testimonial, you would get a 404. But if I made a loop and was outputting all the pages, like for a sitemap or menu, I am going to get all the children. How do I ask processwire if the page is visible because it has a template file or doesn't. I want to do something like this: if($page->template->hasFile()) { do something... } Is this possible? Thanks in advance for the help.
  6. Hi, There is a section of a new website I'm building where there is a need to publish longer form articles, where I intersperse paragraphs of text with images, quotes, videos, and galleries. I'm wondering if anybody has a good approach for constructing this kind of article in ProcessWire. I was originally using a TinyMCE field to embed my images in the correct place in the flow of the body text, with the float classes floating the images appropriately. Including other types of content such as videos and galleries looks a little bit harder to manage, and I can only thinking of including strings to match on in the body text and replacing them in the template, which isn't quite as user friendly as I'd like. It's also a bit of a nightmare to make it work with Susy Compass plugin which is handling the responsive grid. My other idea was to include a repeater field, with each field including optional places for paragraphs of copy, galleries, videos etc. However this doesn't feel that natural, and it's difficult to make the text flow from section to section. Does anybody have any ideas about a good solution for this kind of article? Many thanks.
  7. Greetings ProcessWire People. I created a new PW installation today and all was going well until I tried to create new pages. The template drop-down menu refuses to populate. It lists the templates without a problem on the pre-existing pages when I look at their settings. Does this look familiar? I did need to edit the .htaccess file to allow for a custom RewriteBase. Best wishes, Jenn
  8. I just started with PW and I've gotten the hang of things quite easily but whenever I make a new field it doesn't not appear on the user side of the template. I can manage the field content in the admin section but nothing appears but the title and body on the user side. Is there a permissions/roles function that I have to change? Is there something in the PHP template files I need to change? Thanks.
  9. I often thought about the ability to provide an easy way to install themes like in e.g. Wordpress. Reading the docs about template files, an idea came to me, how this might be possible: Use another layer between template, template files und the connection to the fields. The workflow would be: Declare the use of fields in the template file with their type When creating the template in admin, the declared fields are read in and the user could connect it to his own fields ProcessWire must handle the cloning of the reusable fields on runtime Does this sound serious to anyone? Or do you think this is not possible, achievable or desirable? I know it adds kind of a templating language and another level of abstraction, but for the goal of easy templating this may be not a major drawback, thinking of small business websites or blogs. Using this for reusable template themes, would bring a lot more attention from less php-skilled user and help spread ProcessWire in general. Designers could built their themes and an average user could use that to built his own site.
  10. Hi, In admin -> setup -> templates under basics, under the option "Label" it says "An optional label to describe this template." I thought the text input in this label option is only for descriptive admin purposes, e.g. to help multiple admins know what a particular template is about when viewing the list of templates available on a site. To my dismay, if you use this label option, this text is what appears under "template*" when editing a page. Is this the intended behaviour? I would have thought the template selection field under page settings would show template names rather than template labels since labels can be long. Can this behaviour be changed? Haven't found a setting. Using PW 2.3. Thanks. /k
  11. Hi! I am finally (after months of delay due to other projects) building my first site with ProcessWire. As I delve into documentation and experiment with various settings, I stumbled upon a problem of how to structure the relationship between fields and templates properly. Let's say I will start with establishing a basic structure for blogging. This means at least two templates: for tags/categories and for posts themselves. I assume each template will have main body text. For posts it will be the content of the article, for tags - a description of a tag. I could approach this in two ways: by creating a general field called, say, "main-body" and adding it to both templates or by creating two separate fields, "post-body" and "tag-body". Their function would be the same but each of them would be used for a different template. Now, here is my (obvious by now, I guess) question: what are the advantages and disadvantages of both approaches? Take care!
  12. Hey Guys I got a very basic and hopefully simple question about Templates. I need to display all Pages with a special template (e.g. "location_category") in my Navigation. My solution now: $location_cat = $template->get("location_category"); foreach($location_cat as $lc) { echo"<li><a href="{$li->url}">{$lc->title}</a></li>"; } but this doesn't work. Anyone a solution?
  13. Hi, I'm curious if anyone has implemented some sort of template ala twig, liquid, mustache, handlebars etc. so on and so forth? I noticed a blog post about blog themes which needed to be easier to work with than WP and using a simplified template syntax would definitely help for non-php-ers.
  14. I am starting to use processwire and really liking it but having one issue which i wanted to ask help for. i am working on a directory type of site that consists of two types of information groups for now: Organizations (different types of organizations in different industries) People (different types of people who are in most cases affiliated with the organizations above) I want to create a relationship between the two types so i can list different people that are (or were) part of the organization and was initially able to do this simply by doing a page (lookup) field which i included in one of the above templates/pages to look up the other group. E.g. lookup people in the organization page. However this was too simple for my needs and i also wanted to be able to put related information (e.g. the person's title at the organization, when they started, when they left etc). So an intermediate type of place would be needed to store this which i was not sure how to do. So it would have to be a many-to-many relationship where more attributes about the relationship can be added. I also wanted an easy way to add more relationships (e.g. from the organization page, i want to be able to add more people that work or worked for the organization and also add more details like the title they have in the organization etc). Similarly also under a person's profile, i want to list the organizations he/she is (or was affiliated with). I know this is possible in PW, if someone could please point a novoice like me in the right direction on how to do this or please let me know if more information is needed. Thanks, Binit
  15. Hi! I'm working on my first processwire project and everything is working ok, but i have a question stuck in mi head: which is the "best" way to organize functions and stuff on php/processwire (is my first php project too). I have something like this: -- functions.inc -- home.php -- foo.php -- bar.php functions.inc have all the "get" functions that pull out content of the database, like: function getHomeNews($posts){ $out = array; foreach($posts as $post){ $out["name"] = $post->title; } return $out; } then in my home.php template i put a "render" function and do the echo thing to show the html on the front end: function renderHomeNews($posts){ foreach($posts as $post){ $name = $post{name}; $out = "<h1>{$name}</h1>" } } $news = $pages->find("template=news"); echo renderHomeNews($news); Suddenly a question comes to my mind, what if i put all the "render functions" of the project on renders.inc and all the "getter functions" on getters.inc, so the code on the template could be smaller and all the functions will be on just two files. That makes sense? is the same stupid thing? How do you organize your projects? Thanks!
  16. Hi awesome Processwire folks, I want to make custom processwire admin views. For example, let's say I wanted to create a top level section in the PW admin for managing videos. And I want to use a data grid (just for examples sake... I would probably design a good layout for this - something effective and easy to use)... I know how to add pages to the admin interface by adding them in the page tree, pretty straight forward. The problem is, I am really having a hard time understanding the admin.php template and how the ajax call, methods work. To be honest, I have made a few attempts to modify the behaviors etc in this file with little success. I don't quite understand how processes work at all in PW. I read the classes and it can be over my head in some cases. Does anyone have any suggestions about how I can get my head around this and how I can really start taking advantage of PW to build out some more complex PW admin functionality... any suggestions at all. Thanks in advance,
  17. Since everyone (mostly) are nattering on about responsive templates of one sort or another, though you all might be interested in this little article that I found giving a rough sum up of a pile of responsive frameworks. Not all, by any means, but not a bad little collection: http://designshack.net/articles/css/which-is-right-for-me-22-responsive-css-frameworks-and-boilerplates-explained/ Joss
  18. Hi, I'd like to have an "edit" option for pages in the frontend. I thought I could append an urlSegment to the page url and (instead of coding show and edit functions into one template) simply switch templates: if($input->urlSegments[1] == 'edit') $page->template=$templates->get('page_edit'); This code doesn't work ... Is this even possible or do I need to redirect or put all code in one template? Thanks! thomas
  19. Hi I am pretty new to processwire and it is really growing on me, even though I am not a programmer. One of the things I really appreciate is the freedom and simplicity of the administration structure. However, I think there are a couple of things that could help navigation, and one of those is categorization of templates and fields. This is not intended to be categories for the layout of the site or categorization of data, but simply an optional way of keeping things sorted in the backend if the site gets a bit on the large size. In affect, it would just add another way of sorting fields and templates. For instance, you may want to group fields together that are associated with a repeater, or you may want to group fields together that you tend to use as all-purpose fields like "title" and "image" Anything you wanted really. For many sites, this might be a little bit of overkill, but if a site has a huge number of fields or templates, then this could be useful. Not a major request, just a "nice to have" sort of thing. Joss
  20. I wonder how different people handles different "file structures" for templates. I know that you can only put php code inside a template files, and i have thought that when you have to create a lot of unique "pages" with different php code it will take time to create a template file for each page. Not only that, but eventually, if you create a lot of templates, the templates folder would get very crowded. I was looking for a better way to organize my php files and found this solution. Instead of creating a template for each unique page with custom php code, I just create a single template named "include". This template just has two fields: title and include_path. The code of this template is just: <?php include $page->include_path; ?> In the "include_path" field I set the relative path for including other php files, and this method gives me a more organized collection of php files nested in various folders. For example, for a form called "reservation", I would just create a page with the template "include", and the field "include_path" set to "./php/forms/reservation.php". An example of this file structure: site/ --templates/ -----/styles -----/scripts -----/php --------/forms --------/processes --------/catalogs --------/galleries -----head.inc -----foot.inc -----home.php -----blog-post.php -----include.php Do anyone know if there is a better way to handle php files? o anybody would share their file structure approach?
  21. Hi, Just moved a dev PW install to another domain and found that 1) I couldn't move with it creating PHP errors with a straight move of files and DB. 2) I tried a fresh install updating the admin and then adding the new template but the admin -> setup -> template isn't displaying drop and drag handles so I ccant administrator it at all (see the attached image). any help would be amazing!
  22. Hi there, I want to use Bootstrap with my templates. This may seem a very obvious question but am I correct to assume that you simply add the various Bootstrap folders in to the PW templates folder? Normally, the pathing in Bootstrap is relative to the location of the page(s) in the site structure. However, I am unsure how PW utilises the template folder when pages are actually being served. I hope you understand what I am trying to say here Any thoughts around this one would be appreciated! Thanks --Gary
  23. Hi guys, I have been playing around with multisite recently and wondered - what would be the best way to share some template logic between multisite instances? I have an upcoming project where two different sites would have different users and setups etc but they need to share some basic similarities in look and functionality. I was thinking of setting up the sites as separate sites under multisite and then finding a way of sharing something such as a 'main.php' file that each template calls. I would also like to share a 'base.css' file between the sites as well. I want to do things this way because they want the potential to be able to expand into more sites over time - up to 5 or so. What would be the best way of doing this? Thanks in advance.
  24. When I for example generate a list of articles, I get my pageArray through the API within another page’s template, iterate through it and call the render method for output. Works great. But what to do if I wanted to make the template of these articles behave in a certain manner depending on the the context (the current page’s template) the render method is called from? Is there a way to access the vars existing within the current page’s template or even the current page’s field values on rendering from the articles’ template? To check “Am I rendered within/from another page’s template?” and “Is the var $xy or the field ‘ab’ set to ‘brabra’ in the other page I’m rendered in/from?”
  25. Hello all advanced users (Ryan, Antti, ?) Introduction: I am curious about how the template files get included, called, how they are run and such. Last week or so, I tried to create little MVC (or rather, V(C+M) ) directory skeleton, where templates itself would be classes generating data for 'views', which would be located in one of the directories in '/site/templates/'. However, when I set up Base class, set few of my templates to use this, added View object (which in theory loads file and dumps data in it), prepared some place for common functions, and prepared autorendering in snippets (creating renderXyz function would give the template object variable called $Xyz with generated object/array of objects). However, upon doing all of this, system felt really slow-ish, having generation time 0,5s-1s for localhost and simple, 3 or 4 field pages, which felt really unnatural - and I suspect my noobish object model So this brings me to my question: I noticed that there are TemplateFile objects, with render() function, and such, whole ProcessWire is 100% OOPhp, is there any recommended way I can use ProcessWire as any MVC framework, having autoloading, so I don't have to use require(); with objects for instance? If this doesn't make any sense for you, I'll try rephrase later, but I hope it does make sense.
×
×
  • Create New...