Jump to content

Grouping pages - Same page under different sectionss


mikeuk
 Share

Recommended Posts

I'm interested to know a good approach to grouping pages, where one page may be in two different groups (but re-using the same page for easy client editing).

To clarify for those familiar with Drupal, there I would probably use Taxonomies, Blocks and Context modules. A taxonomy term for each group would be attached to pages (nodes), much like product categories would be, and menus and links would use Taxonomies (the Context and Blocks for displaying different elements on page depending on which group was accessed, but I don't need this part now) .

Example organisation as follows (this is not PW Tree):

Home

 - Courses

  - - Course One

  - - Course Two

  - - Course Three

  - - Course Four

 - Adult Courses

  - - Course One

  - - Course Two

- Junior Courses

  - -  Course Two

  - -  Course Three

  - -  Course Four

- Summer Courses

 - - Courses Three

- Special Courses

  - - Course Four

(The PW Tree would need to be with only one occurrence of each Course page)

I'm keen on the cleanest solution, ideally not adding modules, and a PHP solution no problem (though if it can be within PW as-is, great)

Link to comment
Share on other sites

2 minutes ago, mikeuk said:

Thanks! Looks good, reading up on it now

And if the course options (like Adult Courses) are going to be just options, not entire page (with fields), you can use the Options fieldtype as well.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Sérgio said:

And if the course options (like Adult Courses) are going to be just options, not entire page (with fields), you can use the Options fieldtype as well.

In this case, maybe pages also, but good to know for the future.

 

3 hours ago, LostKobrakai said:

The primer on the topic: 

 

Interesting read. Would need to go through that a number of times, but good to have such information in one place. With that and some other examples, problem solved.

 

In case anyone else needs to know about this, to get what I needed (or close enough), I used the Page field type with Input type as PageListSelectMultiple, then added multiples selections to pages created to be the different groups. Thanks all for the help.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By rjgamer
      Hi,
      is there a hook after the current (active) page got created? Or which method got called in the Page class after the Constructor of the current page got initialized?
      Thanks.
       
    • By rjgamer
      Hi guys,
      the field "redirect_last" of type DateTime got not updated. The update on the field "redirect_counter" works and got saved.
      Does anybody know what I did wrong in my code?
      if ($input->urlSegment(1) === 'redirect') { $page->of(false); $page->redirect_last = time(); $page->redirect_counter += 1; if ($page->save('redirect_counter')) { $session->redirect($page->website_url, 302); } } Thanks.
    • By theoretic
      Hi there! And thanks for Processwire!
      I have an interesting task which i cannot fulfill as i want. Maybe someone could help me please?
      Let's imagine a simple page structure of this kind:
      Category 1
      + Item 1.1
      + Item 1.2
      Category 2
      + Item 2.1
      + Item 2.2
      My task is to attach some items to more than one category, at least to show some items on different frontend category pages. With PW, it's a piece of cake. I've just created a field called Items (of type Page Reference) and attrached it to Category template. Since i have lots of items inside each category i preferred to use Page Autocomplete input for my Items field. The pages available for autocomplete are restricted by a very simple selector:
      template=item
      It works like a charm. But later i decided to make this autocomplete even smarter and to exclude current category children items from it. I tried to update my selector this way...
      template=item,parent!=(page)
      ...and oops, this broke my selector. My autocomplete founds nothing. Sorry, i had to replace the square braces by () because of this forum limitations, i swear i'm using square brackets in real-life selector!
      What am i doing wrong? And is there any way to include current page info in autocomplete-related selectors? Thanks in advance!
       
    • By louisstephens
      So I ran into a very strange issue today. I have a template with a pagetable and I went to add an item to it, when I went to select an image (for an image field) the page instantly threw up an error
      "ProcessPageSearchLive: No search specified"
      The page's content also switched to the image attached. This all worked perfectly last week (local mamp box). Has anyone experienced this before, and how did you solve it?
       

    • By Pip
      Hi everyone, 
      Is there a way for us to replicate the "http://mydomain.com/processwire/page/edit/?id=xxx" and change the template to match my site template? 
      I'm terribly happy with the admin / backend page edit. It covers literaly everything I want to empower my non super admin user in updating pages such as validation, repeater management, file upload. 
      I wish not to allow the users to see the backend for both security and aesthetic reasons. 
      Thanks and hope to hear from you soon. 
       
×
×
  • Create New...