Jump to content

Search the Community

Showing results for tags 'page'.

  • 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. Hi, I have add page field with categories to `user` template. In the processwire admin we can sort the page field items by dragging and moving the items. I would like to bring the same functionality to the front-end, so users can have a functionality to drag and drop. This can be saved via ajax rather than a save button. Would be helpful if anyone have done something like this. Thank you
  2. I may be missing something! How can I sort the order of items in a page field? I am pulling title data based on a template that is being used in a hierarchy, consequently the order is not optimal. Any ideas?
  3. Hi there I installed Processwire and like it very much. @community: Thank you! Everything works well, now I want to set up a multilingual site. Therefore I want to use the Module that comes with the installation. When I click to the «Modules» Tab a completely blank page is shown. In the Adminzone all the other Items are followed by a number – after «Modules» there is no such number: What can I do to get access to the modules? In .htaccess I had to comment the following Lines (If I let just one single line of these uncommented, I get a «500 – Internal Server Error» and Processwire doesn't work at all ): # Options -Indexes # Options +FollowSymLinks # Options +SymLinksifOwnerMatch # <IfModule mod_php5.c> # php_flag magic_quotes_gpc off # php_flag magic_quotes_sybase off # php_flag register_globals off # </IfModule> Thank you for your help.
  4. I have two page fields (PageAutocomplete) and I want to link them ... Templates: - Clients (Parent) -client (Childrens) -Field "Client_properties" (Page autocomplete select template=Property) - Properties (Parent) - Property (Childrens) -Field "Properties_client" (Page autocomplete select template=Client) What should I do?
  5. Not sure if I am approaching this right. Say I have a project page. Each project could have multiple organisations working on it. So I used a page fieldtype and this allows me to select the relevant organisation... if it exists. Then I saw that you could select the ability to add a new 'organisation' (page) in this case. This works fine if all I want to do is create a new organisation name, but how would I also add the other fields for the organisation like address, city, etc? As I said , I may be barking up the wrong tree, but any pointers appreciated.
  6. Hi! Is it possible to have multiple page with shared content where when I edit a page some page will also affect by that changes? Here is a sample tree stucture: -Home --Credit Card ---Newsletter --Widgets ---Social ---Newsletter On the example above. If I edit some fields on Newsletter then the chile page Newsletter on Widget is also affected. Is this possible?
  7. I've stumbled upon a weird issue with repeaters. I've created a repeaterfield with only a title field and assigned it to a template. When I create the first page everything goes well, but then when I'm creating additional pages I'm getting this error: ProcessPageAdd: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'for-page-23947-23799' for key 'name_parent_id' I'm not getting redirected (probably because of the error, but the page does get created with the RepeaterField correctly). The problem seems to exist in the file FieldtypeRepeater.module in the function 'getRepeaterPageParent'. I've modified the file to see what actually happens and it looks like the function doesn't find the required page of saves the page correctly. protected function getRepeaterPageParent(Page $page, Field $field) { $repeaterParent = $this->getRepeaterParent($field); $parent = $repeaterParent->child('name=' . self::repeaterPageNamePrefix . $page->id . ', include=all'); $this->message("L".__LINE__." | selectorresult: ".$parent->id); if($parent->id) return $parent; $parent = new Page(); $parent->template = $repeaterParent->template; $this->message("L".__LINE__." | template: ".$repeaterParent->template); $this->message("L".__LINE__." | parent: ".$repeaterParent->path); $parent->parent = $repeaterParent->id; $parent->name = self::repeaterPageNamePrefix . $page->id; $parent->title = $page->name; $parent->addStatus(Page::statusSystem); // exit early if a field is in the process of being deleted // so that a repeater page parent doesn't get automatically re-created if($this->deletePageField === $field->parent_id){ return $parent; } $parent->save(); $this->message("L".__LINE__." | looking for: ".self::repeaterPageNamePrefix . $page->id); $this->message("L".__LINE__." | current for: ".$parent->name); $this->message("L".__LINE__." | Created Repeater Page Parent: NAME={$parent->name} a " . $parent->path, Notice::debug); return $parent; } See the attachment for the output. IMO the second time FieldtypeRepeater: L574 | should output the previously created page... Anyone has an idea what's going wrong? I'm on the latest master branch.
  8. Let's say I've got a template with a field of a Page type. This field is set to handle multiple options (PageArray). Now, I want to select all pages using this template, that have specific page set in the PageArray field. Basically, something like this: $pages->find('template=x pagearrayfield.contains=page1') Is this possible? Any hints? Thanks in advance.
  9. Hi, I'm trying to combine two find() arrays in a random order but currently can only make it give me back the same order each time. here's what im working with: $works = $pages->find('template=work'); $articles = $pages->find('template=article'); $works->prepend($articles); $randWorks = $works->getRandom(count($works)); foreach($randWorks as $child) { $class = $child === $page->rootParent ? " class='active'" : ''; echo "<a$class href='{$child->url}'>{$child->title}</a>"; }
  10. Hi, I'm currently working on an event website. Each event has 1 or more children containing among others a datetime field. (Each child is a different day in a different place) I would like to move the event page (with its children) to a folder called "past events" once they're history. Anybody have an idea of how to do this? I'm lost here. Thanks a lot.
  11. Hi all, I've just noticed on the site that I'm developing, that the time is wrong for the $page->created field. In the config.php file I have the timezone set to $config->timezone = 'Europe/London'; The date is correct, but the time is out. It is currently 21.35 where I am, but the time that's displayed in the info box for the page (in the admin) is 14:35. So it's a few hours out, and I can't understand why? Any suggestions welcome.
  12. Hello all, So me being a noob can't figure out how can I use $pages->get or find in my custom function. function printTitle($page_id){ echo "Title of the page is ".$pages->get("id={$page_id}"); } Above code is giving me error : Error: Call to a member function get() on a non-object From what I've read probably, I should be using $wire('pages')->get. But this gives following error: Error: Function name must be a string Removing $ from wire solves above error but it doesn't print anything. Any help would be very much appreciated. Thanks a lot.
  13. Plase correct me if something is wrong, I'm still learning the processwire way xd. According to the API Docs http://processwire.com/api/variables/page/ $page->path The page's URL path from the homepage (i.e. /about/staff/ryan/) $page->url The page's URL path from the server's document root (may be the same as the $page->path) So I have to migrate a site from development to production server and all the links were messed up. Why? Because I was using $page->path for redirects. Changed redirects to $page->url and Presto! everything works fine. And, When to use $page->path? Use $page->path when importing other page. example $people = $pages->get('/system/people'); $friend = $pages->get($people->path . $input->urlSegment1); Use $page->url when you need a redirect $session->redirect($friend->url);
  14. output page filter by roles, output in admin and other areas, all good! on Change select page "Page 1022 is not valid for manager" Custom selector to find selectable pages > roles=manager
  15. Hello, I'm trying to create a template that have a field for storing what user modified it. So when editing a page I could have a Single Selection for users. I used a page field with a parent of Users. but when I try to save it says " Page 3234 is not valid for owner" Thanks for any help.
  16. Hi Guys, So I have a template lots of articles . Approximately 23559 pages . I have a field article_id in say example template which is of type of PageArray to the articles template. Now when you try to load that particular template ( example ) PW is becoming slow.... And yes another server we have around 293363 pages and this can grow. So what is the best way to get much speed, or say the PageArray not to load all the stuffs for this is mainly used from an admin point of view. Any suggestions is welcome. Thanks
  17. Hello, I've been reading about Cron & Lazy Cron for days, but since my knowledge of programming is fairly limited, I couldn't get a single task done, so I'm here again to seek some help, probably learn a thing or two. Firstly, Cron is task scheduler run by the server, right? And lazy cron is run by ProcessWire which runs only when page is loaded?? If lazy cron runs only when pages are loaded, how will it run periodically? My requirement is, on every first minute of a day, a specific page(which will contain some code to perform several tasks) should run. Since right now, the code doesn't need any specific time to run, I just run the page manually every morning. But there will be a time when it'll need to run at very specific time. I wish to know if this requirement can be fulfilled by Lazy Cron or will I also need to use cron? TL;DR I wish to know what's the difference between Lazy Cron & CRON? And when to use which? Also, I need to run a PW page specifically a minute after every midnight. Will it possible only with Lazy Cron or will I have to use Cron as well? For running URL instead of file in CRON, I'm looking at this solution by Horst.
  18. I'm working on a site with an about-the-team page where we have a sub-page for each different area of specialty. Each one of these pages will have a list of people who are in that specialty, this list built by pulling 'person' pages that were assigned to that specialty page through a page field. With me so far? Here's the fun part. I want to add a "level" to each of the people that show up on a specialty page. So let's say I'm on the Widget Managers specialty page, and I have the 'people' page field set to pull Alice and Bob to appear listed on this page. But I want Alice to be a 'senior' widget manager and Bob to be a 'junior' widget manager. I could just put a field in the Person page type that lets me set that person's level, but wait! A person can be assigned to more than one specialty page, with different levels on each one! So Alice might be a senior widget manager and a junior doohickey wrangler. She has to show up on the widget managers page as senior, and on the doohickey wranglers page as junior. Ideally, I'd have a repeater field containing two page fields, one to select a person and one to select their level on the current specialty page, but repeaters can't contain page fields. Anyone know of a way I might approach this?
  19. Sorry for that messy topic title but my problem seems very complicated to describe in so few words. So here a better description of my issue: I have a many product detail site under a parent called /overview/. On this product detail site is at the footer a listing of all the others product detail sites including the site itself. (all children of the parent /overview/. So i have for example: /overview/test1/ /overview/test2/ /overview/test3/ /overview/test4/ /overview/test5/ My Code look like this at the moment: <?php $overview = $pages->get("/overview/"); $overviewchildren = $overview->children("limit=4"); foreach($overviewchildren as $overviewchild) {?> <a href="<?=$overviewchild->url?>"><?=$overviewchild->title?></a> <?}?> Now on the site /overview/test1/ the code list show test1, test2, test3, test4. But i want that the child on which the user is at the moment dont show up at the list. So for the site /overview/test2/ the list should show test1, test3, test4 and test5. I hope you understand my problem , cause im from germany and to describe a php issue in english is very hard for me. Thanks a lot everybody for helping me.
  20. I am developing a little app for my university to pass it, the problem is to count some number, i used field page for select stuff in my Template AddProject i have 4 fields beside name and title template AddProject with field ------- Field "SelectUSer" (user1, user2, user3) this field / page / Single page (Page) or boolean false when none selected ------- Field "SelectStatus" (Active, Inactive) this field / page / Single page (Page) or boolean false when none selected ------- Field "SelectProf" (Name, Name2, Name3) this field / page / Single page (Page) or boolean false when none selected ------- Field "SelectSource" (10,20,30,40,50,60,70,80,90,100) this Field is Select not page and i have a page when i list projects ListProject ----------Project 1 ------------Field "SelectUSer" (user1) ------------Field "SelectStatus" (Active) ------------Field "SelectProf" (Name) ------------Field "SelectSource" (20) ----------Project 2 ------------Field "SelectUSer" (user2) ------------Field "SelectStatus" (Active) ------------Field "SelectProf" (Name2) ------------Field "SelectSource" (50) ----------Project 3 ------------Field "SelectUSer" (user3) ------------Field "SelectStatus" (Active) ------------Field "SelectProf" (Name3) ------------Field "SelectSource" (80) i want to query Project 1 | User1 | Active | Name | 20 Project 2 | User2 | Active | Name2 | 50 Project 3 | User3 | Active | Name3 | 80 also query for user to grab field related to user and page user1 | Active | and Field SelectSource to get number from pages which have selected user1 or other user
  21. Hello, I need to find a good way to check for the status of a page, whether it is unpublished or not. If I do echo $page->status I get these values: published: 1 unpublished: 2049 hidden and published: 1025 hidden and unpublished: 3073 My page is hidden by default. So to check for unpublished state I do if ($page->status == 3073) which is working fine. Only thing that worries me is that I know nothing about these status codes and whether it will always be 3073 for hidden and unpublished. So if you know a more generic way of doing this, please share it here. Thank you. Cheers gerhard
  22. I am new to ProcessWire of course, but loving every minute of developing with it. What I am looking to do is to make a field that can list all children of a page. My page would be "callouts" and the children would be "callouts". I would like to list these in a field in another pages template that lists the "callouts" so that the user can pick a number (lets say 3) of them and they will then show on that page. It is preferred for each page to have a unique set of callouts. The alternative, I supposed, is to return only the latest-x callouts on each page, but this negates any amount of customization in regard to these callouts. Is this possible? Can anyone send me in the right direction?
  23. Hi there, First of all, I am sorry for the spam of small questions, but as they are all very simple and fit for my problems, they can as well fit for someone else's problems too. I am testing around the $page->children function and I wanted to find all the children inside the children of the page's first child. It is a bit complicated to explain, but I'll illustrate the situation: first level - > second level - - - > third level - - - - - - > fourth level - - - > third level - - - - - - > fourth level - - - - - - > fourth level - - - > third level If we read this list as a page tree, I want to find the url of each "fourth level" page. I have tried the most logical yet with no success: <?php foreach( $page->child->children->children as $children) { ?> <h1><?php echo $children->url ?></h1> <?php } ?> What am I doing wrong? In JQuery terms I could navigate through my levels with the $(this).parents()[5] function, but Processwire seems to lack this capability. Thanks in advance
  24. Hi there, I am struggling with a very simple variable. I'm using the following function to get the url of a certain child: <?php echo $page->find("projects")->url ?> But it returns an error: Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php line 165) #0 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php(190): Selectors->create('projects', '', '') #1 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Selectors.php(63): Selectors->extractString('has_parent=1, p...') #2 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Pages.php(143): Selectors->__construct('has_parent=1, p...') #3 [internal function]: Pages->___find('has_parent=1, p...', Array) #4 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Wire.php(271): call_user_func_array(Array, Array) #5 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Wire.php(229): Wire->runHooks('find', Array) #6 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Page.php(786): Wire->__call('find', Array) #7 /Applications/XAMPP/xamppfiles/htdocs/cms/wire/core/Page.php(786): Pages->find('has_parent=1, p...', Array) #8 /Applications/XAMPP/xa This error message was shown because you are logged in as a Superuser. Error has been logged. The page called 'projects' exists, what could be the problem? Thanks in advance
  25. Hi there, I have a single page website. This single page website has a section that includes posts that have their own content already displayed on the page. What do you recommend, should it be best to maintain the repeater structure or should I make this section based on pages? (you can think of this like a blog, but the content is already within the main page, thus making it a single-page website) Thanks in advance
×
×
  • Create New...