-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By snck
Hey there,
for a client website I need to implement a "reviewer" role. "Reviewers" should be able to review new (unpublished) articles to give feedback to editors, but not have the permission to change them.
I built a new "reviewer" role that only has page-view permissions for the respective templates, but this permission does not include viewing unpublished pages. How can I grant them access to the unpublished articles without giving them page-edit permission?
Cheers,
Flo
-
By jonatan
Hi! 😄
SITE SETUP / DESCRIPTION:
What? Online art magazine with an "All featured works" and also an "All featured artists" index page, and also individual "Work" and "Artists" pages, and data relations between the different artists and their artworks.
So, I have two different page reference fields, connected by @Robin S's awesome Connect Page Fields module (though that has nothing to do with the issue in fact, Robin's plugin works great! and the issue is the same with or without it).
The two Page Reference type fields are called "works" and "artists". They are meant to simply connect different artists to different artworks.
Fx:
Work 1 (page) –> artists (Page Reference field) : Artist A (page) --->>> (automatically connected) Artist A (page) –> works (Page Reference field) : Work 1 (page)
Work 2 (page) –> artists (Page Reference field) : Artist B (page) --->>> (automatically connected) Artist B (page) –> works (Page Reference field) : Work 2 (page)
ISSUE:
On both Page Reference fields, both on "artists" and on "works" this option "Allow unpublished pages" is activated:
As it says in the option description, supposedly, unpublished pages should be selectable in the page reference field, but they should not be visible, they shouldn't appear, on the front-end...
Frontend:
To show all works related to the artist on the artist individual page I'm doing this:
<?php foreach($page->works as $item) { echo "<img src='{$item->image->first->width(200)->url}' class='pr-2'><a class='pr-4' href='$item->url'>$item->title</a>"; } The problem is now, unexpectedly, if some work is set to "Unpublished", it shows up anyways!
WORKAROUND:
So to get around this I figured out that I can do this:
<?php foreach($page->works as $item) { if($item->is(Page::statusUnpublished)) { return; }; echo "<img src='{$item->image->first->width(200)->url}' class='pr-2'><a class='pr-4' href='$item->url'>$item->title</a>"; } But ofc this is a rather inelegant "solution" which shouldn't really be necessary, right?
I might be missing something basic here, but really can't figure out what it is... I hope one of you awesome guys can help me out 😊
Thanks a lot in advance!
All the best,
Jonatan
-
By rareyush
I am using module "FormTemplateProcessor" to get data in a pages but they all are unpublished and when I am trying to display them with relevent pages it not working
page1 p1 p2 p3 page2 (FormTemplateProcessor) up1 (unpublished page and have p1 id on field knows as "ID") up2 (unpublished page and have p3 id on field knows as "ID") up3 (unpublished page and have p2 id on field knows as "ID") now here
up1, ip2, up3 can be created by p1, p2 or p3 and I am saving respectively I'm saving their id in field which is being used by up1,up2,up3, etc template.
now I want to show the data from unpublished pages which belongs to p1, p2 and p3 respectively
anyone has experienced this or knows something which can help me out ?
-
By cosmicsafari
Hi all,
From my attempts it seems like this is not possible but thought I would raise it here before scrapping the idea and trying something else.
I have an importer script reading a third party feed and creating some pages (page_type_A) based on that.
It also creates some other pages (page_type_B) which are by default set to unpublished as the third party don't seem to have control over some of the data they send us, so we set them to unpublished so that someone on our end needs to approve them, so far so good.
The issue I have encountered is that page_type_A at creation uses the API to set one of its fields to a particular page_type_B, the field is setup as PageSelector. When I look at the database this seems to work fine, but if you go into page_type_A the Page Selector list is always preset to blank?
I updated the Page Selector and set the Selector String to use "include=all" which does populate the drop down with all the correct pages but since there all unpublished it never seems to be preselected to the one which is actually saved as in the DB.
Hope that makes some sort of sense.
-
By jrtderonde
Hey,
I completely built this platform with ProcessWire (http://djmag.live/). It works fine except for the fact that some pages are still show, even when I change their state to "unpublished". They are still showing when they are returned through $object->children("template=_foo") or $pages->find("template=_foo").
Does anybody know what the problem might be?
-