-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By jds43
Hello, I'm trying to list the categories, on the front through select options, that have been selected by page reference field (multiple pages PageArray) on the child pages.
Things to Do (would only display three, six, seven, nine in select)
-thing one (-category three, -category nine)
-thing two (-category six, -category seven)
Lodging (would only display one, two, three, four in select)
-lodging one (-category one, -category two)
-lodging two (-category three, -category four)
Dining (would only display five, six, seven, eight in select)
-dining one (-category five, -category six)
-dining two (-category seven, -category eight)
Categories(hidden page)
-category one
-category two
-category there
-category four
-category five
-category six
-category seven
-category eight
-category nine
-category ten
$categories = $pages->find(1129)->children('include=hidden'); foreach($categories->references('category') as $ref) { echo $ref->title; } This selector isn't working, but it seems 'references' would be helpful. I've never used it before, so I'm not sure how to employ for this.
https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#page-gt-references
-
By stanoliver
Good morning everyone!
I have a growing number of posts about cars, bikes, airplanes, etc.
The following code (below) just works fine and returns only the posts of the category=cars as I desired together with pagination.
In my url I have for example /categories/cars/car1 or /categories/bikes/bike1
I do want to filter my posts not only with ... category=cars ... but also with category=bikes or category=airplanes and at best:
If my url is /categories/bikes/ then ... category=cars ... should be overwritten or replaced by ... category=bikes ...
If my url is /categories/airplanes/ ... then the filter should be ... category=airplanes ... (I know a work around by creating almost identical templates where I could just change the "category=cars" part of my code but that's comes of a prize by repeating a lot of identical code and is not a good habit). In the documentation I read something about the "has_parent" selector but I could not get to work it related to the urls mentioned above.
<?php foreach ( $results = $pages->find('id>1, template=templateblogpost, category=cars, limit=5, sort=-postdate') as $post 😞?> <!-- Blog entry --> <div class="g8-card-4 g8-margin g8-white"> <!--<img src="/g8images/bridge.jpg" alt="Norway" style="width:100%">--> <div class="g8-container"> <h3><b><?= $post->title; ?></b></h3> <h5>Datum: <span class="g8-opacity"><?= $post->postdate; ?></span></h5> </div> <div class="g8-container"> <p><?= $post->posteditor; ?></p> <div class="g8-row"> <div class="g8-col m8 s12"> <p> <a href="<?= $post->url; ?>"><button class="g8-button g8-padding-large g8-white g8-border"><b>Details lesen »</b></button></a> </p> </div> <div class="g8-col m4 g8-hide-small"> <!--<p><span class="g8-padding-large g8-right"><b>Comments </b> <span class="g8-badge">2</span></span></p>--> </div> </div> </div> </div> <!-- END BLOG ENTRIES --> <?php endforeach; ?> <? echo $results->renderPager(array( 'nextItemLabel' => "rückwärts", 'previousItemLabel' => "vorwärts")); ?> -
By adrian_gp
Hello everyone,
I'm new in this forum and my english is not perfect so sorry for the mistakes.
I have an Blog Project and i will use categories.
Here is the structure:
Blog -> displays all the Blogposts (template=BlogPage) Post-Name -> display the specific Post (template=BlogPost) Categories -> not visible in the menu (template=CategoriesPage) Categorie-Name -> not visible in the menu (template=CategoriePage) For your information:
(BlogPost) every blogpost has its own page (BlogPost) in Admin i can select the categorie per Field -> SelectMultiple Pages (Checkbox) (fieldname=categories) (Blog) displays all the BlogPosts and all the categories under the ParentTemplate CategoriesPage, which also have their own side Now the Problem:
On Blog -> I would like to click on a category and only see the post that has this category checked in the BlogPost.
CategoriePage -> what do I have to insert there to show only the specific posts which use the checked categorie?
Let me know if you need more information
Thanks for your support
-
By zaib
I've a page "blog" which have child pages (blog posts). Right now I've 11 pages (blog posts) and I'm fetching all the posts in my "blog" pages which displaying fine, Issue is only 10 results are showing this is how I'm fetching
$entries = $pages->find("template=blog-entry"); foreach($entries as $entry){ <a href='{$entry->url}'>$entry->title</a> }
-
By Outcydaz
I have a site structure as follows
Shirts
-- Shirt One
-- Shirt Two
Shoes
-- Shoe One
-- Shoe Two
Category
-- Spring Summer
-- Fall Winter
Each page has a 'category' page field.
I'm trying create a navigation that shows only the child categories as follows:
Shirts
-- Spring Summer
-- Fall Winter
Shoes
-- Spring Summer
-- Fall Winter
When Shirts -> Spring Summer is clicked i'd see only spring summer shirts. Same for Shoes, you'd only see Spring summer items for shoes.
Help please.
-