We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ☆ A M B ☆
    • 711 Posts
    So many questions tonight, sorry guys and girls.

    I am currently building a restricted area of a website for a client, where members have to sign up to access the content. At the moment if an Unauthorized user tries to access the a restricted page they just get an error, I was thinking it would be great if somehow the Unauthorized error page could display a little content from the restricted page.

    This content teaser would come from either the introtext field of the restricted document or a TV Value.

    Thanks again
      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 3749
      • 24,544 Posts
      If you check whether they’re authorized in a snippet, the snippet could forward unauthorized users to another page with $modx->sendRedirect(). That page could be published and use Ditto to show the teasers, but not as links, and just have a link to the Registration page.

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 7231
        • 4,205 Posts
        ..but not as links..
        If you are using Weblogin the links to unauthorized will direct to the login page and once logged in you will be directed to the requested link. At least this is the way I remember it working wink
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 3749
          • 24,544 Posts
          Quote from: dev_cw at Feb 12, 2009, 05:40 AM

          If you are using Weblogin the links to unauthorized will direct to the login page and once logged in you will be directed to the requested link. At least this is the way I remember it working wink

          Right, but this always takes you to the same login page. I think Onesmarthost wants to show teasers from a particular section when unauthorized users try to access that section ( a great idea, IMHO).
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 37550 ☆ A M B ☆
            • 711 Posts
            Quote from: BobRay at Feb 12, 2009, 12:44 PM

            Right, but this always takes you to the same login page. I think Onesmarthost wants to show teasers from a particular section when unauthorized users try to access that section ( a great idea, IMHO).

            I have to admit the idea came from from agregory which I seen the commerical bounties section, I will have a go at it soon but I think it could proove popular for sites trying to encourage new members and also sites will benefit from google being able to index more pages.

            Aaron
              http://www.onesmarthost.co.uk
              UK MODX Hosting with love.