ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

{logged_in} and {logged_out} problem

September 11, 2011 10:12am

Subscribe [2]
  • #1 / Sep 11, 2011 10:12am

    mathalete

    86 posts

    Hi

    I’m having an issue when using {logged_in} and {logged_out} conditionals.

    Basically, the code below is showing up in the html source but isn’t actually rendering in the browser.

    Any ideas?

    {if logged_in}   
                                    
                                    {exp:safecracker channel="{segment_1}" safecracker_head="yes" entry_id="{entry_id}" include_jquery="no" class="form has-validation"}
                                    
                                    
                                    {!-- 1 to many  custom fields displayed here --}
                        
                                        {if questions}
                                        
          
                                        
                                        <ol>
                                        
                                        {questions}
                                        
                                        <li><input type="hidden" name="questions[row_order][]" value="row_id_{row_id}" /><input type="hidden" name="questions[row_id_{row_id}][col_id_1]" value="{question}" ><div class="clear fix"><label for="questions[row_id_{row_id}][col_id_2]" class="form-label">{question} <em>(Required)</em></label><div class="form-input form-textarea"><textarea rows="10" cols="30" name="questions[row_id_{row_id}][col_id_2]" id="questions[row_id_{row_id}][col_id_2]" dir="ltr" class="required form-textarea" required="required" title="This field is mandatory">{answer}</textarea></div></div></li>
                                                    
                                        {/questions}
                                        
                                        </ol>
                                        
                                        {/if}
                                       
                                       
                                       <div class="clear fix"> 
                                         <label for="uploads" class="form-label">If necessary, please upload a supporting document.</label> 
                                        {field:uploads}
                                       </div>
                                        
                                        <div class="clear fix"> 
             
                                                <label for="administrator_comments" class="form-label">Administrator comments</label> 
             
                                                <div class="form-input form-textarea">
                                                    {field:administrator_comments}
                                                </div> 
             
                                         </div> 
                                        
                                        
                                        
                                            <div class="form-action clear fix">
            
                                               <button class="button" type="submit" data-icon-primary="ui-icon-circle-check">Save</button>
            
                                            </div>
                                            
                                       {/exp:safecracker}
                                    {/exp:channel:entries}
                                    
                                    {/if}
                                    
                                    {if logged_out}
                                    
                                    {exp:member:login_form return="/"}
                                            
                                                 <div class="clear fix">
                                                     <label for="username" class="form-label">Username</label>
                                                    <input type="text" name="username" id="username" value=""  maxlength="32" required="required" size="25" />
                                                </div>
                                                
                                                 <div class="clear fix">
                                                     <label for="password" class="form-label">Password</label>
                                                    <input type="password" name="password" id="password" value=""  maxlength="32" required="required" size="25" />
                                                </div>
                                                
                                                <div class="form-action clear fix">
                                                    <button class="button" type="submit" data-icon-primary="ui-icon-circle-check" name="submit">Submit</button>
                                                    </div>
                                                    
                                                <div class="clear fix">
                                                 <a href="http://{path=member/forgot_password}">Forgot your password?</a>
                                                </div>
                                            
                                            {/exp:member:login_form}
                                       
                                  {/if}
  • #2 / Sep 11, 2011 3:29pm

    Mark Bowen

    12637 posts

    Hi mathalete,

    Could you try just placing this into the same template and seeing what you get.

    {if logged_in}
    You are logged in.
    {/if}
    
    {if logged_out}
    You are logged out.
    {/if}

    Let us know how that outputs for you. One thing to check when these kinds of things happen is to ensure that you don’t have your template type set to static.

    In this case you’ll most likely want to have it set to webpage as shown in the attached image. You might want to check that this is true in your case.

    Thanks,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases