Jump to content

ov3rtak3r

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

2 Neutral

About ov3rtak3r

  • Rank
    Newbie
  1. I know this topic is really old right now, but I think the reason to decide for either pages or a repeater hasn't changed. I make heavy use of repeaters on a template with the name "Actor". An actor has many Movies, Television Series and Theater Plays he starred in. He will also get several awards for these works. Creating tab pages and add some repeaters seems really easy and is also a comfortable way to create a whole new actor's page. If I would change it to pages, the page tree would have to look like this: Tom Taller Movies First Movie Second Movie Television Top Series Awards Top Actor 2017 James Brunette Movies First Movie Second Movie Theater Code 1007 For the one who created this pages, it should be easy and comfortable. So he shouldn't create a "Category"-Page (like "Movies") on his own. What template type would the category pages even have? To create the child pages without those category parents would look a way to mixed if you have about 1000 entries of different types. What do you think? I wouldn't need a Movie, Theater, Series and Awards database in form of structures pages, like in the Structure Tutorial somewhere on this page. The administrative effort would be too high, because most of the entries will only be used once. I hope to hear from you
  2. I found a way to solve my problem, the Post helped me too: The code looks the following and works with the TemplateEngineModule. If you want my solution to work without the TemplateEngineModule, remove the line $view->setFilename('person');. Template person_listing Settings in Backend: The allowed Page URL Segments: regex:^[0-9a-zA-Z\-\_]+$ Template person_listing.php Code: if ($input->urlSegment1) { $pagename = $input->urlSegment1; $match = $pages->get('name='.$pagename); if (!$match->id) throw new Wire404Exception(); $view->setFilename('person'); // Remove this line if you don't use TemplateEngineModule! echo $match->render(); return $this->halt(); } Hope this helps someone else.
  3. Hello everyone! I am new to Processwire and really like it, but now I have a problem that I can't solve by myself. I have created following templates: data_people (no template-file) person_listing (person_listing.php) person_detail (person_detail.php) I have added the following Pages: Actor, Director, Stuff using template person_listing.php [visible in frontend] "People" using template data_people [not visible, only for data] -> "Georg Klonee" using template person_detail [is visible, but should not be shown using path /en/person/georg-klonee] Example Person: Georg Klonee The Problem: He is a Actor and a Director, so I want him to be shown in the Listing of /en/actors and /en/directors. No problem until here - it works. But now, when I click him, the URL for the Detail-Page is unfortunately /en/person/georg-klonee. But I want it to be /en/actors/georg-klonee, if i open the details from Actors-Page (and of course /en/directors/georg-klonee when on Directors-Page). How can I get this to work? I am also using TemplateEngine-Module with TemplateTwigEngine-Module, hopefully this won't be a problem? I tried it with URL-Segments for person_listing.php. But how can I abort the rendering of people_listing and start rendering person_detail.php? Thanks for your help in advance.
×
×
  • Create New...