Jump to content

Redirect Page URL


DaveC
 Share

Recommended Posts

If you go to http://www.vivesport.co.uk/ all the links work apart from 'Our Sessions - Read more'. This opens a page called 'sessions'. This page does not exist, hence the error. It should direct to 'sessions-page' which does exist and can be opened from the header.

How do I change the incorrect url, please? It must be so basic, yet I have spent hours trying to find out from the PW site and forum!

[Ignore the errors at the bottom of the page.]

Link to comment
Share on other sites

The main menu (I suppose what you are referring to as opened from the header) is pointing to the page /our-sessions/. On the contrary, your Read More' button is pointing to /sessions/.

51 minutes ago, DaveC said:

How do I change the incorrect url, please?

You should check in the template file (or maybe an .inc file if that is what was used to generate the Read More buttons) and change it there. It's hard to tell without seeing the code. The simplest way to find is to to search your /site/templates/* for this:

<div class="service-wrapper">

That's the wrapper for those service buttons (Read More).

Link to comment
Share on other sites

32 minutes ago, DaveC said:

How do I edit what goes into each tab and how to add/delete tabs?

I have no idea. It's a JavaScript accordion and I have no idea which one the developer used or what is supposed to go in there. Maybe if you could show us the code on the relevant template file....

Link to comment
Share on other sites

21 hours ago, kongondo said:

I have no idea. It's a JavaScript accordion and I have no idea which one the developer used or what is supposed to go in there. Maybe if you could show us the code on the relevant template file....

Sorry, I think I have wasted your time by posing the question badly.

I've got the code [site/templates/includes/sessions.inc] but it's not that what I am looking for, but how such an accordion can be inserted into and deleted from a page. I go to the 'Our Sessions' page and template and nothing about the accordion can be seen. How did it get there!!

You really are being helpful, kongondo, and it is very much appreciated.

Link to comment
Share on other sites

38 minutes ago, DaveC said:

but how such an accordion can be inserted into and deleted from a page

I doubt you'll find this :-). In ProcessWire, JavaScript stuff is handled on the client side. This wouldn't be saved with the page (database). There are two things on that page. The tabs and the accordion. Both are definitely built using JavaScript. The usual way to do this is to output items in your template file (e.g. items from a $pages->find() and in a html block, identify them using an ID or a class. E.g. <div id="something">. There would be JavaScript code in the template file or included via some script that will look for "#something" and build the final markup (i.e., the accordion, etc).

Looking at the HTML source code of your sessions page (F12), it seems the tabs are built using bootstrap. The accordions are probably built using jQuery. This is the code from the source code on the sessions page:

<script>
    $(document).ready(function() {
    	$('.accordion .accordion-section-title').removeClass('active');
        $('.accordion .accordion-section-content').slideUp(300).removeClass('open');

    function close_accordion_section() {
        $('.accordion .accordion-section-title').removeClass('active');
        $('.accordion .accordion-section-content').slideUp(300).removeClass('open');
    }
 
    $('.accordion-section-title').click(function(e) {
        // Grab current anchor value
        var currentAttrValue = $(this).attr('href');
 
        if($(e.target).is('.active')) {
            close_accordion_section();
        }else {
            close_accordion_section();
 			
            // Add active class to section title
            $(this).addClass('active');
            // Open up the hidden content panel
            $('.accordion ' + currentAttrValue).slideDown(300).addClass('open'); 
        }
 
        e.preventDefault();
    });
});
    </script>

Looking at the HTML source code still, it seems your accordions are empty. That's why they are not opening.

 

Edit: So, if you can find out the template file or possibly a .inc file that has the above script, we can help you with how to output the accordion content.

Edited by kongondo
Link to comment
Share on other sites

It's in footer.inc, should it not be in sessions.inc? [There is text within sessions.inc.]


       

<!-- Footer -->
        <div class="footer">
            <div class="container">
            
                <div class="row">
                
                    <div class="col-footer col-md-4 col-xs-12">
                        <h3>Contact Us</h3>
                        <p class="contact-us-details">
                            <b>Phone:</b> 0783 622 6545<br/>
                            <b>Email:</b> <a href="mailto:vivesportoffice@gmail.com">vivesportoffice@gmail.com</a>
                        </p>
                    </div>                
                    <div class="col-footer col-md-4 col-xs-12">
                        <h3>Our Social Networks</h3>
                        <p><?php echo $pages->get('/')->footer_social_text; ?></p>
                        <div>
                            <a href="https://www.facebook.com/VivelaSport/"><img src="<?php echo $config->urls->templates?>img/icons/facebook.png" width="32" alt="Facebook"></a>
                            <a href="https://twitter.com/_vive_sport_"><img src="<?php echo $config->urls->templates?>img/icons/twitter.png" width="32" alt="Twitter"></a>
                        </div>
                    </div>
                    <div class="col-footer col-md-4 col-xs-12">
                        <h3>About Our Company</h3>
                            <p><?php echo $pages->get('/')->footer_about_text; ?></p>
                    </div>

                </div>
                <div class="row">
                    <div class="col-md-12">                 

[reference to logins appear here, deleted as mentioned earlier]

                        <div class="footer-copyright">© 2020 ViveSport</div>

                    </div>
                </div>
            </div>
        </div>

        <!-- Javascripts -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="<?php echo $config->urls->templates?>scripts/jquery-1.9.1.min.js"><\/script>')</script>
        <script src="<?php echo $config->urls->templates?>scripts/bootstrap.min.js"></script>
        
        <!-- Scrolling Nav JavaScript -->
        <script src="<?php echo $config->urls->templates?>scripts/jquery.easing.min.js"></script>
        <script src="<?php echo $config->urls->templates?>scripts/scrolling-nav.js"></script>

        <script>
    $(document).ready(function() {
        $('.accordion .accordion-section-title').removeClass('active');
        $('.accordion .accordion-section-content').slideUp(300).removeClass('open');

    function close_accordion_section() {
        $('.accordion .accordion-section-title').removeClass('active');
        $('.accordion .accordion-section-content').slideUp(300).removeClass('open');
    }
 
    $('.accordion-section-title').click(function(e) {
        // Grab current anchor value
        var currentAttrValue = $(this).attr('href');
 
        if($(e.target).is('.active')) {
            close_accordion_section();
        }else {
            close_accordion_section();
             
            // Add active class to section title
            $(this).addClass('active');
            // Open up the hidden content panel
            $('.accordion ' + currentAttrValue).slideDown(300).addClass('open');
        }
 
        e.preventDefault();
    });
});
    </script>

 

Edited by kongondo
Wrap code in code blocks <>
Link to comment
Share on other sites

54 minutes ago, DaveC said:

It's in footer.inc,

OK, this code just shows where the scripts are called but not the PHP that fetches the accordion items.

54 minutes ago, DaveC said:

should it not be in sessions.inc?

Not really. It's fine in footer.inc in order to load JavaScript last (it's a page load optimisation thing).

54 minutes ago, DaveC said:

There is text within sessions.inc.]

I bet this is where the PHP (ProcessWire) code to fetch the accordion items from the database items is (unless someone deleted it :-)). Please show us the code in sessions.inc. Mostly likely there will be a $pages->find() or a $pages->get('/some/path')->children();. The items probably use a template called session(s).

PS: Always wrap your code in the code blocks <>.

Edited by kongondo
Link to comment
Share on other sites

Spoiler

<!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#kirklees" aria-controls="kirklees" role="tab" data-toggle="tab">Kirklees</a></li>
    <li role="presentation" class=""><a href="#calderdale" aria-controls="calderdale" role="tab" data-toggle="tab">Calderdale</a></li>
  </ul>

  <!-- Tab panes -->
    <div class="tab-content">
        
        <div role="tabpanel" class="tab-pane active" id="kirklees">
            <!-- start of sessions tab -->
            <div class="col-md-12">
                                    
                                    <br> 
                                    <!-- start of session type -->
                                    <div class="accordion">
                                        <div class="accordion-section">

                                            <a class="accordion-section-title community-club" href="#accordion-1">Badminton</a>
                                            <div id="accordion-1" class="accordion-section-content">

                                               <?php
                                                // get an array of all child pages, hidden or not, but with a template called session
                                                $children = $page->children('include=all, template=session, session_area=kirklees, session_type=badminton, sort=session_day');
                                                    // loop through the array and output markup for each child
                                                    foreach($children as $child) {
                                               ?>     
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <div class="session">
                                                            <h3><?php echo $child->title; ?></h3>
                                                            <h4><?php echo $child->session_venue; ?></h4>
                                                                <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                                                <p> </p>
                                                            <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                                        </div>
                                                        </div>
                                                    </div>
                                                <hr>
                                                <?php
                                                        }
                                                ?>  
                                            </div>
                                        </div><!--end .accordion-section-->
                                    </div><!--end .accordion-->
                                    <!-- end of session type -->

                                    <!-- start of session type -->
                                    <div class="accordion">
                                        <div class="accordion-section">

                                            <a class="accordion-section-title after-schools-club" href="#accordion-2">Netball</a>
                                            <div id="accordion-2" class="accordion-section-content">

                                               <?php
                                                // get an array of all child pages, hidden or not, but with a template called partner
                                                $children = $page->children('include=all, template=session, session_area=kirklees, session_type=netball');
                                                    // loop through the array and output markup for each child
                                                    foreach($children as $child) {
                                               ?>     
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <div class="session">
                                                            <h3><?php echo $child->title; ?> - <?php echo $child->session_school_type; ?></h3>
                                                            <h4><?php echo $child->session_venue; ?></h4>
                                                                <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                                                <p>test </p>
                                                            <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                <hr>
                                                <?php
                                                        }
                                                ?>  
                                            </div>
                                        </div><!--end .accordion-section-->
                                    </div><!--end .accordion-->
                                    <!-- end of session type -->

                                    <!-- start of session type -->
                                    <div class="accordion">
                                        <div class="accordion-section">

                                            <a class="accordion-section-title schools" href="#accordion-3">Schools</a>
                                            <div id="accordion-3" class="accordion-section-content">

                                               <?php
                                                // get an array of all child pages, hidden or not, but with a template called partner
                                                $children = $page->children('include=all, template=session, session_area=kirklees, session_type=schools');
                                                    // loop through the array and output markup for each child
                                                    foreach($children as $child) {
                                               ?>     
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <div class="session">
                                                            <h3><?php echo $child->title; ?>  - <?php echo $child->session_school_type; ?></h3>
                                                            <h4><?php echo $child->session_venue; ?></h4>
                                                                <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                                                <p> </p>
                                                            <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                <hr>
                                                <?php
                                                        }
                                                ?>  
                                            </div>
                                        </div><!--end .accordion-section-->
                                    </div><!--end .accordion-->
                                    <!-- end of session type -->


                                    <!-- start of session type -->
                                    <div class="accordion">
                                        <div class="accordion-section">

                                            <a class="accordion-section-title sport-specific-session" href="#accordion-4">SEN</a>
                                            <div id="accordion-4" class="accordion-section-content">

                                               <?php
                                                // get an array of all child pages, hidden or not, but with a template called partner
                                                $children = $page->children('include=all, template=session, session_area=kirklees, session_type=sen');
                                                    // loop through the array and output markup for each child
                                                    foreach($children as $child) {
                                               ?>     
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <div class="session">
                                                            <h3><?php echo $child->title; ?></h3>
                                                            <h4><?php echo $child->session_venue; ?></h4>
                                                                <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                                                <p> </p>
                                                            <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                <hr>
                                                <?php
                                                        }
                                                ?>  
                                            </div>
                                        </div><!--end .accordion-section-->
                                    </div><!--end .accordion-->
                                    <!-- end of session type -->

                                    <!-- start of session type -->
                                    <div class="accordion">
                                        <div class="accordion-section">

                                            <a class="accordion-section-title community-club" href="#accordion-5">After Schools Club</a>
                                            <div id="accordion-5" class="accordion-section-content">

                                               <?php
                                                // get an array of all child pages, hidden or not, but with a template called partner
                                                $children = $page->children('include=all, template=session, session_area=kirklees, session_type=after_schools_club');
                                                    // loop through the array and output markup for each child
                                                    foreach($children as $child) {
                                               ?>     
                                                    <div class="row">
                                                        <div class="col-md-12">
                                                            <div class="session">
                                                            <h3><?php echo $child->title; ?> - <?php echo $child->session_school_type; ?></h3>
                                                            <h4><?php echo $child->session_venue; ?></h4>
                                                                <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                                                <p> </p>
                                                            <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                <hr>
                                                <?php
                                                        }
                                                ?>  
                                            </div>
                                        </div><!--end .accordion-section-->
                                    </div><!--end .accordion-->
                                    <!-- end of session type -->


            
            </div><!--/.col-md-12-->
            <!-- end of session tab -->
        </div>

        <div role="tabpanel" class="tab-pane" id="calderdale">
            <!-- start of sessions tab -->
            <div class="col-md-12">
                

                <br> 
                <!-- start of session type -->
                <div class="accordion">
                    <div class="accordion-section">

                        <a class="accordion-section-title community-club" href="#accordion-1a">Badminton</a>
                        <div id="accordion-1a" class="accordion-section-content">

                           <?php
                            // get an array of all child pages, hidden or not, but with a template called session
                            $children = $page->children('include=all, template=session, session_area=calderdale, session_type=badminton');
                                // loop through the array and output markup for each child
                                foreach($children as $child) {
                           ?>     
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="session">
                                        <h3><?php echo $child->title; ?></h3>
                                        <h4><?php echo $child->session_venue; ?></h4>
                                            <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                            <p> </p>
                                        <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                    </div>
                                    </div>
                                </div>
                            <hr>
                            <?php
                                    }
                            ?>  
                        </div>
                    </div><!--end .accordion-section-->
                </div><!--end .accordion-->
                <!-- end of session type -->

                <!-- start of session type -->
                <div class="accordion">
                    <div class="accordion-section">

                        <a class="accordion-section-title schools" href="#accordion-2a">Schools</a>
                        <div id="accordion-2a" class="accordion-section-content">

                           <?php
                            // get an array of all child pages, hidden or not, but with a template called partner
                            $children = $page->children('include=all, template=session, session_area=calderdale, session_type=schools');
                                // loop through the array and output markup for each child
                                foreach($children as $child) {
                           ?>     
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="session">
                                        <h3><?php echo $child->title; ?></h3>
                                        <h4><?php echo $child->session_venue; ?></h4>
                                            <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                            <p> </p>
                                        <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                    </div>
                                    </div>
                                </div>
                            <hr>
                            <?php
                                    }
                            ?>  
                        </div>
                    </div><!--end .accordion-section-->
                </div><!--end .accordion-->
                <!-- end of session type -->

                <!-- start of session type -->
                <!--<div class="accordion">
                    <div class="accordion-section">

                        <a class="accordion-section-title after-schools-club" href="#accordion-2a">Netball</a>
                        <div id="accordion-2a" class="accordion-section-content">

                           <?php
                            // get an array of all child pages, hidden or not, but with a template called partner
                            $children = $page->children('include=all, template=session, session_area=calderdale, session_type=netball');
                                // loop through the array and output markup for each child
                                foreach($children as $child) {
                           ?>     
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="session">
                                        <h3><?php echo $child->title; ?></h3>
                                        <h4><?php echo $child->session_venue; ?></h4>
                                            <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                            <p> </p>
                                        <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                        </div>
                                    </div>
                                </div>
                            <hr>
                            <?php
                                    }
                            ?>  
                        </div>
                    </div>--><!--end .accordion-section-->
                <!--</div>--><!--end .accordion-->
                <!-- end of session type -->



                <!-- start of session type -->
                <!--<div class="accordion">
                    <div class="accordion-section">

                        <a class="accordion-section-title sport-specific-session" href="#accordion-4a">SEN</a>
                        <div id="accordion-4a" class="accordion-section-content">

                           <?php
                            // get an array of all child pages, hidden or not, but with a template called partner
                            $children = $page->children('include=all, template=session, session_area=calderdale, session_type=sen');
                                // loop through the array and output markup for each child
                                foreach($children as $child) {
                           ?>     
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="session">
                                        <h3><?php echo $child->title; ?></h3>
                                        <h4><?php echo $child->session_venue; ?></h4>
                                            <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                            <p> </p>
                                        <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                        </div>
                                    </div>
                                </div>
                            <hr>
                            <?php
                                    }
                            ?>  
                        </div>
                    </div>--><!--end .accordion-section-->
                <!--</div>--><!--end .accordion-->
                <!-- end of session type -->

                <!-- start of session type -->
                <!--<div class="accordion">
                    <div class="accordion-section">

                        <a class="accordion-section-title community-club" href="#accordion-5a">After Schools Club</a>
                        <div id="accordion-5a" class="accordion-section-content">

                           <?php
                            // get an array of all child pages, hidden or not, but with a template called partner
                            $children = $page->children('include=all, template=session, session_area=calderdale, session_type=after_schools_club');
                                // loop through the array and output markup for each child
                                foreach($children as $child) {
                           ?>     
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="session">
                                        <h3><?php echo $child->title; ?></h3>
                                        <h4><?php echo $child->session_venue; ?></h4>
                                            <p><?php echo $child->session_day; ?> - <?php echo $child->session_time; ?></p>
                                            <p> </p>
                                        <p><a href="mailto:enquiries@vivesport.co.uk?subject=<?php echo $child->title; ?> booking please" class="btn btn-primary" target="_blank">Book this session</a></p>
                                        </div>
                                    </div>
                                </div>
                            <hr>
                            <?php
                                    }
                            ?>  
                        </div>
                    </div>--><!--end .accordion-section-->
                <!--</div>--><!--end .accordion-->
                <!-- end of session type -->



        </div>
    </div>
    <!-- end of tab panes -->
    </div>

 

Link to comment
Share on other sites

That's the one. It seems the sessions page does not have any children or some of their settings were changed:

  • Is the sessions pages titled Sessions or Our Sessions?
  • Does it have children?
  • Does the site have a field named session_venue?
  • What type of field is it? PageReference, Text, other?
  • Does the site have fields named session_type, session_day, session_time and session_area?
  • What type of fields are they?
  • Does the site have a template called session?
Link to comment
Share on other sites

Quote

    Is the sessions pages titled Sessions or Our Sessions?

Our Sessions

 

Quote

   Does it have children?

No

Quote

    Does the site have a field named session_venue?

No, but it's template [sessions-page] does now.
 

Quote

   What type of field is it? PageReference, Text, other?

Text area

Quote

    Does the site have fields named session_type, session_day, session_time and session_area?

It does now.

Quote

What type of fields are they?

Text

Quote

    Does the site have a template called session?

No, there's one called 'sessions-page'
   

Link to comment
Share on other sites

24 minutes ago, DaveC said:
Quote

   Does it have children?

No

Your 'Our Sessions' page needs to have children for this (and the other similar) code to work:

23 hours ago, DaveC said:

$children = $page->children('include=all, template=session, session_area=calderdale, session_type=schools');

The children will be titled Huddersfield Eagles Junior Badminton Club, etc.

In addition, those children:

  • Need to use a template named session.
  • That template (session) needs to have the following fields: session_type, session_day, session_venue, session_time and session_area 

 

Link to comment
Share on other sites

I have followed your instructions. There are now some data entered.

When the tabs have not been selected:

 - the current site shows:

<div class="accordion">
  <div class="accordion-section">
    <a class="accordion-section-title community-club" href="#accordion-1">Badminton</a>
    <div id="accordion-1" class="accordion-section-content" style="display: none;">
    </div>
  </div><!--end .accordion-section-->
</div>

 - whereas the original site shows:

<div class="accordion">
    <div class="accordion-section">
        <a class="accordion-section-title community-club active" href="#accordion-1">Badminton</a>
            <div id="accordion-1" class="accordion-section-content open" style="display: block;">
                <div class="row">
                    <div class="col-md-12">
                        <div class="session">
                            <h3>Huddersfield Eagles Junior Badminton Club</h3>
                            <h4>Royds Hall Sports Centre</h4>
                            <p>Sunday - 9:00am - 12:00pm</p>
                            <p> </p>
                            <p><a href="https://web.archive.org/web/20180815082939/mailto:enquiries@vivesport.co.uk?subject=Huddersfield Eagles Junior Badminton Club booking please" class="btn btn-primary" target="_blank">Book this session</a></p>

Clicking the current version alters nothing. When the original is clicked and opened the code starts:

<div class="accordion">
    <div class="accordion-section">
        <a class="accordion-section-title community-club active" href="#accordion-1">Badminton</a>
            <div id="accordion-1" class="accordion-section-content open" style="display: block;">

So, being a great detective [!!], the accordion isn't opening!

Link to comment
Share on other sites

Hi @DaveC,

Is there any reason you have the admin login link in the footer?

If you are the only person logging in to the admin, then I would suggest you remove it.

If there are others who must log in, then I would suggest you create your own login and redirect a valid user to the admin page.

 

  • Like 1
Link to comment
Share on other sites

On 5/30/2020 at 2:00 PM, DaveC said:

When I look at the templates in the site via ftp it does not match what PW sees:

That's not how it works ? 

  • ProcessWire does not just read files on your system arbitrarily
  • Templates have to be 'registered' with ProcessWire
  • Templates do not need to have a template file (some of the files you are seeing in the ftp)
  • Template file names do not need to match the name of the template (i.e., default is that they match, but this can be changed)
  • Some developer uses the templates folder to store PHP files they can include in their template files or modules
43 minutes ago, DaveC said:

After many hours work, investigations, and trial & error, the Our Sessions page now works!!!

Hooray! We have (partial) lift-off ? 

  • Like 1
Link to comment
Share on other sites

48 minutes ago, rick said:

Hi @DaveC,

Is there any reason you have the admin login link in the footer?

If you are the only person logging in to the admin, then I would suggest you remove it.

If there are others who must log in, then I would suggest you create your own login and redirect a valid user to the admin page.

 

No idea! Is it a security risk?

I've never used PW - not any CMS - before. Circumstances forced it upon me when I had to move my daughter's site from one host to another which would not accept PW 2.7 and the original writers could not be found.

With more trial & error I suspect that there is a lot of unnecessary - and incorrect - code in and amongst the current configuration! It is certainly an interesting and frustrating learning curve!!

Link to comment
Share on other sites

26 minutes ago, kongondo said:

That's not how it works ? 

  • ProcessWire does not just read files on your system arbitrarily
  • Templates have to be 'registered' with ProcessWire
  • Templates do not need to have a template file (some of the files you are seeing in the ftp)
  • Template file names do not need to match the name of the template (i.e., default is that they match, but this can be changed)
  • Some developer uses the templates folder to store PHP files they can include in their template files or modules

And there was me thinking I was getting to grips with things! You've just left me confused with templates, template registering, and template files!!

Link to comment
Share on other sites

6 minutes ago, DaveC said:

No idea! Is it a security risk?

I've never used PW - not any CMS - before. Circumstances forced it upon me when I had to move my daughter's site from one host to another which would not accept PW 2.7 and the original writers could not be found.

With more trial & error I suspect that there is a lot of unnecessary - and incorrect - code in and amongst the current configuration! It is certainly an interesting and frustrating learning curve!!

It is a security risk by exposing the url to login to the admin side of Processwire to people that don't require access.

Ah-ha! ? Everyone here has been at the starting gate, but I have trouble getting out of the gate. LOL. The first thing you should know is that Processwire is not like *any* other CMS/CMF. Specifically, the terminology may be confusing at first, eg, "Page". I would recommend that you read up on the getting started topics of this forum, and read the articles they may link to. I know, it's the boring part. Believe me, you will sleep better when you understand how PW works.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...