Search the Community

Showing results for tags 'page reference'.



More search options

  • 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

  • ProDrafts
  • ListerPro
  • ProFields
  • ProCache
  • Form Builder
  • Likes
  • ProDevTools
  • Custom Development

Categories

There are no results to display.


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

Found 14 results

  1. Wondering if anyone can help me get past a sticking point. I'm setting up a Processwire instance in a multiple site setup (using Soma's multisite) to run several related websites. I am getting stuck on the tagging system that I am using (adapted from a standalone PW site I'm running). I have the tags themselves set up as Pages, and the Tags field on the related pages is and ASMselect field that populates based on the pages underneath /tags/ in the tree. This system works fine on the standalone site. Where I am running into issues, is with trying to use them with the multisite setup. Specifically, choosing the proper subset of pages for tags on the ASMselect input tab. I want to choose only the tag pages for the site in question. My tree is laid out like this: Multisite / | site1.com | subsections | site2.com | subsections | Tags | site1.com | tagA | tagB | site2.com | tagC So far, the best I've been able to do is to use 'parent.has_parent=/tags/' in the Custom Find or Selector String portion of the Selectable Pages section of the input. This gives me the options of choosing tagA, tagB, or tagC on a page under site1.com. What I'd like to find is a selector that allows me to only see tagA, tagB as options from a page under site1.com and only tagC on a page under site2.com. Elsewhere in my php templates, I'm using $page->rootParent->title to set the proper scope and URLs for things, but I have not found a way to get that to work in this field input setup. I am trying to avoid creating specific fields and templates for each site, as unified templates were part of the purpose of going with a multisite install. Thanks in advance for any ideas.
  2. I want the admin to select one of the child of a parent in "page reference" as radio buttons, but it comes out empty here is my hook in site/ready.php $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if ($event->object->hasField == 'childLinks') { $page = $event->arguments('page'); $parent = "parent=" . $page->path; $event->return = $event->pages->find($parent); } });
  3. rareyush

    I added a field type 'page reference' using checkboxes knows as services. now i want to display the pages according to service. I can display all services list but when i click on any services then I can see whole code of site any idea where i am wrong ? main cate1 subcate1 subcate2 cate2 subcate1 subcate2 services first-service second services these services is being used as a page reference in subcate1, subcate2 templates. and in the navbar when i click on services and then when i click on any of the following service then i can see whole source code of my site.
  4. Hello all. A few days ago I decided to redo my first PW theme (knowledge sharing one) trying to apply some more elegant logic and most important - to learn to filter page results by a Page reference field with some values. So far it is all going well except the fact that I am now at a stage to add some page parameters and am a bit stuck as to how to filter them. Here is an example of the structure planned to use: !-- Articles (template = articles.php) !---- Article 1 (template = articles-inner.php) !---- Article 2 .. !---- Article 3 .. !-- Categories (no template file) !---- Category1 (same template as parent) !---- Category2 .. !---- Category3 .. !-- OS (no template file) !---- Windows (same template as parent) !---- Linux !---- MacOS So far the home page and articles-inner pages are fully working. I need to show in the sidebar two blocks; Categories, OS where clicking on one would show only the posts containing the PageReference field value. To list the categories and OS in the block won't be a problem as I would just need to query the parent and list all the children (if any) with the proper markup. However, how to have the Categories and OS blocks link only to the specific posts that is the issue. In my previous version of the knowledge profile, I had the "categories" listed as a parent and the posts matching the category were just children of it. But now my goal is to learn how to add different parameters using Page Reference and have a way to show the results per the specific value. How would you organize a similar structure and what approach to take to have a simple and elegant solution? Or, if you know of a PW profile that I could dissect and learn the filtering mechanism of Page Reference etc. it would be even better. I am presently looking at the Ghost profile however Wire-approach is still not very much clear to me, unfortunately.
  5. I have the following page structure Continents Countries Regions I then have pages "walks" which has a multi-select Page Reference field Regions (I've tried using dynamic fields for this but it wasn't accomplishing what I needed) which has the regions listed by country and then the region (continent is more for searching later on so doesn't need to be seen here). I'm trying to get a count of firstly all the walks within a continent, then country, then region but can't seem to figure out the selector for this. Thanks, Heather
  6. Hi, I'm sure this is simple but I just can't seem to get my head around it. I have a template walk_segments which has two page reference fields start_town and end_town. Both of those fields reference walk_towns which has a Maps Marker field called marker. I would like to get a map in the Walk Segments which has markers for both the start_town and end_town. I can't figure out what to put in the selector to get that. $items = $pages->find("template=walk_towns, marker!='', $page->start_town, sort=title"); $map = $modules->get('MarkupGoogleMap'); echo $map->render($items, 'marker'); Any help would be most appreciated! Heather
  7. cstevensjr

    This is the first collaborative project that my wife and myself have worked together on. The goal was simple --- Create a public online experience that showed off the "Custom Artisan" jewelry that she has made for years. https://yellowrosecreations.biz The website is built around an e-commerce platform. Through ongoing work with a new client of mine, I had gotten to know about Ecwid as an e-commerce solution that was tied in closely in with Square (a financial services, merchant services aggregator and mobile payment company). My work with Ecwid for the past few months afforded me with the opportunity to get this web project up and online in no time. Let me be clear, while this e-commerce solution works fine, our long term goal is to use Padloper for the online store. That long term goal is more about controlling where our data resides and being able to freely enhance the total shopping experience. I already know that a solution based on ProcessWire will give us the ultimate e-commerce flexibility. The great thing about the ProcessWire platform is that there are numerous tools that enable you to get things done. To my delight, I discovered that using the Hanna Code module allowed me to easily integrate Ecwid (which actually means e-commerce widget) code into a ProcessWire website. I will write a separate article about how that works at a later time. The website makes use of the UnSemantic Responsive CSS grid with Zurb Foundation components added/mixed in. This is an unconventional combination to use, but it works for us. On the ProcessWire side, there were a few critical modules that contributed to gettng this website online: TextformatterHannaCode ProcessDatabaseBackups CronjobDatabaseBackup AdminLinksInFrontend ProCache FormBuilder PrevNextTabs WireMailSmtp ImportPagesCSV ProcessEmailToPage MarkupProcesswirePhotoswipe Hanna Code snippets were used throughout to populate the Ecwid Online Shopping Bag, the Ecwid Main Online Store, different Ecwid Product Category Listings, the green Foundation Buttons in the website sidebar and some other webiste features. ProcessWire Page Table and Page Reference fields were instrumental in generating the product descriptions that are used on the Ecwid Online Store. Each jewelry item has it's own page within ProcessWire that can be later used with the Padloper e-commerce solution. On the backend side, we were able to create a repository page that keeps track of each product, SKU, pricing and their current disposition status related to the Online Store. This has been a fun and fascinating project to work on. It took us a few weeks to get everything worked out. As I have said before, ProcessWire makes projects of this type possible because you are not limited by the front-end framework you can use. Even when there are not dedicated modules to incorporate a feature that you like, this platform and it's openness allows you to do things that are impossible to do on other systems. It just takes a little ingenuity, planning and time on your part to make things work.
  8. Peter Knight

    I have a PageReference field called related_random where my client selects a particular parent page in the tree. On the front end I then need to get a random child page of that page based on some selector values. At the moment I'm using a Matrix field and this outputs the page ID (1090) on the front end <?php foreach($page->related_products as $item) { if($item->type == 'related_product') echo " {$item->related_random->title} "; } ?> What I can't get my head around (and what I really want to do to echo some values of that page IDs children Essentially I want to get a maximum 1 random child page of 1090 with a template of product. The shoddy selector below is clearly wrong but correct in explaining what I want to do. $related_random->child->getRandom("template=product,limit=1") Don't know if that makes any sense?
  9. Hello, This is my first post here, I've been using processwire for a while now and having a great time with it! Quick question regarding the Pages field: I am using a multiple-select pages field on the User template, so that a dealer can be associated with each user of certain roles. This works flawlessly without any conditions being set, but if I set 'Show this field only if' to roles=dealer|dealer-admin the field shows and hides as desired, but revert to null when saved. Is there anything I'm missing here? Thanks, Tom
  10. Hello, on a fresh 3.0.62 install I have a page reference field 'mypages' with these settings for selectable pages: In my site/ready.php I have this hook: /** * custom page select */ wire()->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name != 'mypages') return; $pages = new PageArray(); $pages->add($this->pages->get(1)); $ids = $pages->explode('id'); $event->return = $event->pages->getById($ids); }); On a normal page, the hook is working and the mypages field has only 'Home' in the select dropdown . But when I put the mypages field inside a repeater, it is not working. I have this problem on a project that is in development right now and have spent quite some time to try and find the reason. Then I made a fresh PW install to verify the behavior. No matter if repeater dynamic loading is on or off, the page reference field always returns the set of pages defined by the settings in the page reference field. The hook is ignored. Can anyone please verify this and let me know so I can file a bug report. Also if you have an idea how to fix this, I would be happy.
  11. itsberni

    Hi Guys, i've got a page reference field "mh_lstg" with a specific selector in it: template=lstg_mainTmpl|mh_mainTmpl,mh_bautraeger.id=mh_bautraeger.id This will give me no results. If i set the "=mh_bautraeger.id"-part to "=1070", i'll get the result as expected. The "mh_bautraeger" is also a page reference. This field is located in both templates (lstg_mainTmpl|mh_mainTmpl ). I will achieve, that i only get the data from lstg_mainTmpl, if i select in the mh_mainTmpl the mh_bautraeger-ID, that belongs to the record from "lstg_mainTmpl". Can anybody give me a tip ( assumed you know what i mean ;-) )? Many Thanks!!!
  12. I am embarrassed that I have to ask this question, but I cannot get my selector to work. I want to output a list of players that are assigned to their specific team. Each Player has a team_name field which references their team as a page field select drop down. $players = $pages->find("template=player, team_name=$page->id"); foreach ($players as $player) { echo "<li><a href='{$player->url}'>{$player->title}</a></li>"; } $page->id is referencing the team page. I have tried multiple variations using both find/get but I am missing something. Any kick in the head is appreciated. My structure is like so Players -- Player 1 Teams -- Team 1
  13. Hello, Im using the following structure Location 1 - Employee -- John Doe --Jane Doe - Department -- Confused Department --Even More Confused Each employee is assigned a department which I am using a select page reference field. I need to be able to print the title of the department. I am using the following to output my fields, but for the "department" field, I can only get it to print the id. I am assuming this is because its only a page reference field as to why it will not print the title. Any tips are appreciated $employees = $page->find("template=profile"); foreach ($employees as $employee) { echo '<tr>'; echo "<td>{$employee->first_name}</td>"; echo "<td>{$employee->last_name}</td>"; echo "<td>{$employee->job_title}</td>"; echo "<td>{$employee->department}</td>"; echo "<td><a href='{$employee->url}'>Profile</a></td>"; echo '</tr>'; I have tried echo "<td>{$employee->department->title}</td>"; with no luck
  14. The Page Reference-field seems to create a one-way link from one page to one/many other pages. This means that the related pages will only display on the referring page while not on the referred pages. Is it possible to make a two-way link that can be displayed both on the referring page and the referred pages? My Page Reference field is configured as follows: Deference in API as: Multiple pages (PageArray). Input field type: PageListSelectMultiple (Perhaps it is necessary to use another field type?)