We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1343 ☆ A M B ☆
    • 2,213 Posts
    Ok, this is driving me up the wall as technically it should work fine, but it’s giving me problems...

    I am using the personalize script uncached [! !] to create a sidebar login/out system. The personalize calls these two chunks:

    Guests
    [[WebLoginPE? &type=`simple` &liHomeId=`99` &profileHomeID=`103` &loginFormTpl=`login_template`]]
    


    WLPE Template
    <div class="members"><br />
    	<div class="loginform">
    
    		<form action="[~[*id*]~]" method="post">
    			<fieldset>
    				
    					<input type="text" name="username" class="field" value="Username" onfocus="if (this.value == 'Username') { this.value=''; }" onblur="if (this.value == '') { this.value='Username'; }" />
    				
    					<input type="password" name="password" class="field" value="Password" onfocus="if (this.value == 'Password') { this.value=''; }" onblur="if (this.value == '') { this.value='Password'; }" />
    				
    					<p><a href="[~104~]">Forget Your Password?</a><br /><label for="stayloggedin" class="checkbox">Remember me</label><input type="checkbox" name="stayloggedin" id="stayloggedin" tabindex="3" size="1" value="604800" /></p>
    					
    					<input type="submit" value="login" name="service" class="button" />
    			</fieldset>
    		</form>
    	</div>
    </div>
    


    Members
    [[WebLoginPE? &type=`simple` &loHomeId=`1` &successTpl=`logout_template`]]
    


    WLPE Template
    <div class="members"><br /><br />
    	<div class="loginform">
    		<form action="[~[*id*]~]" method="post">
    			<fieldset>
    				<p align="center">You are logged in to the member section.  Please log out when finished.</p>
    				<center><button type="submit" name="service" class="button" value="logout">Log Out</button></center>
    			</fieldset>
    		</form>
    	</div>
    </div>
    


    The problem is if you’re logged in you will get the standard template appearing instead of the reduced template for the logout area. So it trys to display user image, and the other stuff that you normally have.

    I had the WLPE calls uncached and personalize cached and that didn’t work so I flipped it and now it always shows (not surprised for some reason)

    So my question is how can I get WLPE to shut up and just show the one simple template in the sidebar? I’ve been going over this for a few days now and well I don’t need to get a hair cut any longer. This seams so SIMPLE!!! Why is it being evil?

    AMDbuilder
      Patrick | Server Wrangler
      About Me: Website | Tweets |  MODX Hosting
      • 28033
      • 925 Posts
      Just to check, are you having two WLPE calls on the same page?

      If so, that’ll cause some issues, IIRC.
        My Snippets
        -> PopUpChunk v1.0
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Hello,

        I’m using personalize to server them based on the users login state.

        AMDbuilder
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          I just noticed it’s also ignoring the logout target so when I logout I get a 404 error instead of the home page.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 28033
            • 925 Posts
            Hmm...I had an issue where WLPE wouldn’t parse snippets that were in template chunks, so maybe it’s similar, but in the opposite sense?
              My Snippets
              -> PopUpChunk v1.0
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Ok, so if the custom template doesn’t work how can I change the default template the system uses? I can give the other calls custom templates , but this one needs a custom template. That or how else can I get the logout working?

              AMDbuilder
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 1343 ☆ A M B ☆
                • 2,213 Posts
                I figured out that there is like snippet.template.php which contains the "master" templates for everything and so I tweaked the template so the one I needed was provided vs stock and all other calls used stock as a custom template so problem solved.

                AMDbuilder
                  Patrick | Server Wrangler
                  About Me: Website | Tweets |  MODX Hosting