0

I'm looking answer because I need access for all user in database access to disable entries

This mean somebody will publish something and administrator will be change status for entires from live to disable and CMS will be send notification to user about that. When you user will be login to account will be see entires live and disable and access to this entries. Right now I can show every entries live and disable but when click link live entire go to template and work fine but when I click link disable entries to to 404 page.

Thanks for help, SS

3

You would need to create a custom route in the Control Panel that matches the same basic routing as your entries. Then in the entry template, you need to add some extra code that pulls disabled entries. Something like below.

{% if entry is not defined %}
    {% set entry = craft.entries.section('whatevs').uri(craft.request.url).status(null).first() %}
    {% if entry is null %}{% redirect '404' %}{% endif %}
{% endif %}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.