Jump to content

Search the Community

Showing results for tags 'Template'.

  • 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. Hello, I'm new from PW. I had seen it a few months ago, I had watched Ryan's video and... few months had passed ! So recently, I searched hours and hours on the web a better solution for my blog than Wordpress. I had tried many CMS and suddenly I remembered : ProcessWire So, I installed it few days ago with the fabulous Blog Profile module (thanks Ryan). And now I want to add widget in my sidebar. I have searched on forum, in videos or tutorial, but I think I don't have made a good search. I try myself but it doesn't work So if someone would help me or send me some greats links, I think it will be top Thanks a lot everyone and to finish I'm proud to join your community ! Elkolonel.
  2. Hi all It would be great if I could create some new templates (php code) from admin menu in backend without to use FTP client Somethink like this -->> What do you think about it?
  3. Hi there, I've got two templates that need some of the same fields. So, is it possible to get a field value from another template? So when I update on one template, I update on all other fetching this field? Thanks
  4. Hello there, I have a template only to get a simple structure in my page tree. (for example: a category-site) the sites from this template must be hidden... if they are not hidden, you can see them in my nav-menu! Now - my question: Is there any way to set a permanent hidden-state to the template? Why I need this: ...because there are some admin-noobs... I think they will forget to set the page hidden. Thanks a lot. Stefan
  5. I am building my first website with processwire, but of course I am starting with a relatively complex site for an entertainment booking agency. Before I spin my wheels for several days or weeks, I am seeking advice on the best approach to create a dynamic xml file that will contain file paths for different sized jpg files for images, mp3 and ogg files for audio, and mp4, webm and ogv files for video to play natively in various browsers within responsive pages that will adapt to the device on which they are displayed. Most of my experience is with Dreamweaver, and I know how to do this with static pages because there would be a unique xml file for each static page. However, creating a static page for each artist on a roster of 200 that is growing monthly is not practical. I've looked at several content management systems and have concluded that I want to invest my time in the one I consider the best--processwire. So here I am asking for help. I note that something similar has been done with the module Local Audio Files-MP3-DB by horst, but I'm not sure that is the best approach here because I will likely have an average of only 20 jpg files and 5 of each of the other file formats for each performing artist on this website. The key is that I must create a unique xml file for each of at least 200 artists that will reference their unique works. I would appreciate any suggestions either on what to try or what not to try so that I can avoid wasting time on "blind paths". If it helps to visualize my objective, you can view a template of an artist's page at http://www.book-entertainer.com/rob-garrett/. I know all of your time is valuable, but I am just not sure where to start. Thank you. Bill
  6. Hi Has anyone ever tried to create a YUI 3 template as a starting point or would it be a waste of time? I have searched forums with built-in search and google and found nothing of relevance.
  7. Hi I have just started with PW and after struggling to get a test site on my hosting platform. PHP 5.2.17 mysql 5.0.96. Problem with .htaccess and follow symbolic links which I have sorted out (commented out) Default page and admin loaded OK. I then uploaded Foundation files flushed site (?flush=1) Problem can be see at http://new.stpiusx.za.org/ Same problem in Chrome & Firefox I have done similar installation on local server (PHP 5.3.10 mysql 5.5.32) all worked OK Any thoughts would be appreciated not sure were to look? System seems very fast Allan
  8. Hi, I'm following this tutorial on Windows using XAMPP 1.8.3 and ProcessWire 2.3. Well, "following" means that I am stuck in step 2. There are two folders in the root directory of the website (htdocs), "site-default" and "wire". I created "planet.php" in "site-default/templates" and "site/templates". But when I click "Add New Template" in the admin interface, it says "No new template files were found in: /site/templates/*.php". I'm sure this is a typical newbie thing and I'm really sorry for asking but: what am I missing? Where do I create new templates? Thanks in advance! Hendrik
  9. Hello everyone, I'm currently trying to find the best way to solve a problem and I'm not really sure, whether there's an easy solution. Consider this example: 1. There is a template for "author", "article" and "tag". 2. The "article" template has a) a pages field for authors on or multiple authors and b) a pages field for on or mutilple authors tags 3. On the "authors" page I want to display a list of all tags, for which this author has articles. The naive approach would be to just get ALL tags, iterate through them, check if there's a page with the given author and this tag and if yes, add them to the list of display tags. Something like this: $authorTags = new PageArray(); $allTags = $pages->find('template=tag'); foreach ($allTags as $tag) { if($pages->count("template=article, tags=$tag")) { $authorTags->add($tag); } } While this works great, there's obviously a big performance problem: it doesn't scale since each additional tag results in one additional query. The cache will have to be cleared on changes of each article, which could happen pretty often, so this is not a solution. My second approach was to have an additonal field for tag in the "author" template and write a module that hooks into page save of "article" pages, checking for changes in the tags field and replicating them in the given author's pages. In the "author" template you can then just display your tags as a "native" field, which shoud be simple and performant. While I think, that this will probably the best and most clean solution, it will also be a lot of work, so I was wondering whether anyone of you maybe knows a) an easier (while still performant) way to archieve this, or b) a finished module that already solves this problem or is at least a good starting point to solve it. Thanks a lot for your answers already, Marc
  10. Hi, I'm trying to build my own install file to be able to start every new PW install with a fixed number of fields, So far I've dumped my previous PW database into a .SQL file and included it in the install.sql, during the install it nicely imports all my database settings into my newly installed database but I do have a problem with the admin user, when I try to login I get a any ideas how I can fix this or copy a database into a new install profile?
  11. The 'global' flag for field is great, untill you don't need that field anymore and you have over 30 templates that have that field assigned... It looks like you have to manually edit every template and delete the field from there, save, then check the checkbox to confirm? Is there a way to do this faster? Thanks.
  12. Hi Guys I'm doing the unthinkable and attempting to recreate cmscritic.com with processwire. A task that I'm sure will be incredibly fulfilling once complete and I'm hoping will teach me how to use this CMS in the process. (pun not intended). I'm messing with the blog profile at the moment and when I look at the template, I see it's got a field "site title" which when viewing the page, is populated with the words "Basic Blog Profile" and used in the masthead. Since I want to use an image logo instead and have it easy to change within the backend, I added an image field to the template and uploaded my logo. The issue i'm having is that I'm unsure as to how to call this and within which template. I can see it in the page now as an uploaded image but I don't know how to call it within the masthead. Tough to explain, hopefully my question makes sense. Here's a screenie to show what I mean. Thanks in advance! Mike
  13. Hi there, I'm currently writing a module that needs a Process action to generate some previewable HTML+CSS Code. In my code I'm doing something that boild itself down to this, to generate the preview: public function executePreview() { $p = new Page(); $p->template = $this->get('template'); // configurable module variable return $p->render(); } Would be fine if this wouldn't render inside the default admin template (that I need for other actions of the same controller). This inserts a lot of CSS and JS that I can't use here. The Preview action will be embedded into another action as an iFrame and I already tried calling it with ?modal=1 which get's rid of header, footer and sidebar, but still loads the CSS and JS. What I'd like to do know is to programmatically change the template of this view, but I wasn't quite successful. I inserted this in the above code to make it render another inside my module folder, but it still renders inside the default admin template: $this->page->template->set('filename', $this->config->paths->MyModule . 'my-blank-template.php'); While this would be pretty hackish, it also doesn't work... but I really hope that someone of you has a better answer to this problem? With kind regards, Marc Edit: While stepping through the code I wondered, where exactly the $page->render() function is?
  14. Let's say I have a page that I don't really need a template per-se. It's a one time page with no fields. Maybe it's a page with a form on it, or a big 3rd party iframe, or an htm image map (remember those?). Do you just use a basic page and then put an if/else statement in basic-page.php? If($page->id == 1003){ <iframe .../> }else{ //render content as normal ... } Or are there other strategies for dealing with these edge cases?
  15. Hi all.. I was wondering, Is there a nice css/template framework out there? I have been playing around with Twitters Bootstrap, but It has its limitations.. Let me hear your 2 cents..
  16. Hi all, I was thinking what's the best approach for a multi-themed website. The point of this is to build a website that has a simple website for mobile within a subdomain (m.domain.com, for example). How can this be achieved? I assume everything would be easy if there would be another "/site" folder. Is this it? If so, how can that be achieved? Many thanks in advance! Cheers
  17. Hi all, I know that every template has its file associated for rendering the page. But i wonder if i can change file in a page that require a different visualization without create another template. Is that possbile ? ADB
  18. Is it possible to replicate a field in a template? Let me give an example. 1) I create a field named "article" (textarea multi language) 2) I insert the field "article" in a new template "page news" 3) I create a new page with the template "page news" 4) I enter my body, title, and ... 5) I want to put 3 fields "article", another page in 5 fields "articles", in another 20 fields "article" and so on ... using the same template. there is a method? FIND NOW -> http://processwire.com/api/fieldtypes/repeaters/ Thank u...
  19. So we have a project setup that has added a module that uses the addHookAfter('save') functionality. Essentially the goal is after a we actually "Save" the page options in the backend of PW we grab specific fields we have created and do an API call to an email service which includes doing a $page->render() to grab the full html for the page we are editing and send that along as the body of that email. The issue I am seeing when I actually view the page via the browser there are images that are showing correctly from a loop of articles but when I do the render I am only getting the path to the image like for example if the image url is: /site/assets/files/2123/feature_car.jpg I am only getting via the $page->render() instead of the full path: /site/assets/files/2123/ The section that this is happening is running a loop on articles inside of the template file and is causing the error is similar to this. The problem is happening with this part of the code: <?php echo base_url().$a->featured_image->url; ?> Heres the overall code: <?php $related_articles = $pages->get(1007)->children("template=article,is_national=1,related_edition={$pages->get(1021)->related_edition},related_categories!={$pages->get(1132)},sort=-date,include=all"); if ($related_articles->count()) { foreach ($related_articles as $a) { ?> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <a href="<?php echo base_url().$a->url; ?>" title="Learn More: <?php echo $a->title; ?>" target="_blank"><?php echo ($a->headline != '') ? $a->getUnformatted("headline") : $a->title; ?></a> <?php $suffix = ' <a href="'.base_url().$a->url.'" target="_blank" style="text-decoration: none;" title="Learn More: '.$a->get->title.'">Learn More »</a>'; if ($a->featured_image) { ?> <table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom: 10px;"> <tr> <td> <?php if ($a->featured_image->url->description != '') { ?> <a href="<?php echo $a->featured_image->url->description; ?>" title="<?php echo $a->get('headline|title'); ?>"><img src="<?php echo base_url().$a->featured_image->url; ?>" alt="<?php echo $a->get('headline|title'); ?>" border="0" /></a> <?php } else { ?> <img src="<?php echo base_url().$a->featured_image->url; ?>" alt="<?php echo $a->get('headline|title'); ?>" border="0" /> <?php } ?> </td> <td valign="top"><p style="font-family: Arial, sans-serif; font-size: 13px; color: #555555; line-height: 16px; margin-top: 0; margin-bottom: 10px;"><?php echo (trim($a->summary)) ? $a->summary.$suffix : truncate($a->body, 250, '..'.$suffix); ?></p></td> </tr> </table> <?php } else { ?> <p style="font-family: Arial, sans-serif; font-size: 13px; color: #555555; line-height: 16px; margin-top: 0; margin-bottom: 10px;"><?php echo (trim($a->summary)) ? $a->summary.$suffix : truncate($a->body, 250, '..'.$suffix); ?></p> <?php } ?> </td> </tr> </table> <?php } } ?>
  20. Hi all I am very new to ProcessWire, but have managed to create a content managed site in super quick time! I currently have 2 templates, home and content - that's all I've needed! But now I need to add a new column on the right of my pages that will hold a list of PDF downloads. The list of downloads will be different on each page - some will have a few, some will have none. Each item in the list needs a name, thumbnail image, and document to link to. I was tempted to create a new template for each, but I don't think that's the way to go. Would I do this like a list of news articles? But then I don't know how to specify which 'articles' appear on which page? Any pointers would be greatly appreciated!
  21. I've been working on a medium-to-large scale project using pw (browsable alumni works and news repository, for a multimedia design school). I assume this kind of project is just what PW was written for: loads of information that can be cross-searched, etc.. And for it to work smoothly, sharing fields is the way to go, of course (do correct me if I'm wrong..) The "problem": some fields acquire diferent roles in different templates ("title" can be a Title or a student name on a student Template), and may benefit from independent descriptions (for setting protocols - specially important on a repository) Multiple field descriptions would be awesome (specific to each template), but I imagine the work that such a change could mean may not be worth it... I haven't explored the DB very deeply, but I assume the description is in a field entry, and would have to be in the field-to-template entry... Or maybe I'm reading it all wrong Any thoughs? Am I completely off the ball park?
  22. hello forum, i've read somewhere in the docs that the use of template tags was given up with the switch from version 1 to 2. does that mean this code <li><a$class href='{$child->url}'>{$child->title}</a></li> as found in the head.inc with the official download is no longer valid? Or is the use of curly brackets a regular use of PHP (I'm very new to PHP unfortunately)? Wouldn't you rather write <?php echo $child->url ?> instead of {$child->url} ?? thanks, christoph
  23. Looking in to PW as an alternative to Drupal. Just wondering if there is any way to define the template file on render. I read in another post about setting a variable before render and checking for that in the template. ($useThumb, was the example to render a thumbnail) But I wanted to keep my templates clean and create, for example a teaser.php template file. Inside of that I would use something like a switch($page->template) statement on $page->template to write out the html for the corresponding type. For example, say I have a video, blog and image type. I could simply have them all use the teaser template file on the homepage. So the real question is, can I switch the page template dynamically and will I be able to access the "original" template in the new template. Here is a code sample to demonstrate: // home.php $videos = $pages->find("parent=/video, featured=1, limit=3, sort=-date"); echo "<h2>Featured Videos</h2>"; foreach($videos as $video) { //set teaser template $video->render();/* Want to render using the teaser.php template */ } // REPEAT for blog and image, all use sample template // teaser.php switch($page->template) { case "video": echo '<div class="teaser video"><div class="field-video">{$page->video}</div></div>'; case "blog": echo ' <div class="teaser-blog"> <div class="title">{$page->title}</div> <div class="date">{$page->date}</div> <div class="summary">{$page->summary}</div> </div> '; break; }
  24. Hi, I am a newbie to programming and I am developing this site for a client of mine(WIP) : http://greenpantry.in/test820fcec/ It is a single page site, where the content is divided into sections. I want to know if it would be feasible to use Processwire to manage the content of the site. From what I have read, processwire's templating system is based on pages. I want to know if the client will be able to edit each section individually from the admin panel, as I feel creating a single long template for the page will be kind of messy. 'our platters' and 'gallery' are the two sections they want to be able to update. Btw PW looks so fresh and this is probably a trivial thing to execute. I just wanted to be sure it was possible before i dive in. If this is possible, any pointers as to where I can start will also be very helpful as I am just now beginning to go through the docs/videos. Thank you!
  25. How do I go about adding the process field to a new template? I created a new template and placed it under the admin page (I also set it to use the admin template) - however, I don't see the "process" field as an option to be added to it. Thanks in advance for any pointers! Edit: To clarify, I assigned "admin" as the alternative template filename for this new template because I need to add other fields to it.
×
×
  • Create New...