Jump to content

sam-vital

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by sam-vital

  1. 15 minutes ago, dragan said:
    
    $mostRecent = $pages->find("parent=123, template=news, sort=-modified, limit=3");
    foreach($mostRecent as $teaser) {
    	echo "<h3><a href='{$teaser->url}'>{$teaser->title}</a></h3>";
    }
    

    123 is simply the id of the parent page, under which your news/blog pages live

    Read more about selectors:
    https://processwire.com/api/selectors/

    And keep this bookmarked:
    http://cheatsheet.processwire.com/

     

     

    Thank you!

    Works a treat

  2. Hi,

    I'm creating a News/Updates section for a client and they would like the 3 most recent Updates previewed on the home screen. So this would be Title and Date Posted. These blog posts will be child pages of a News and Updates page, which is a child of the Home page. So it's like Home -> News -> Blog posts. I don't need this to be a nav menu, just something to show the newest updates.

    All help is appreciated ?

  3. Hi,

    I'm trying to setup up ProceesWire for a site I am working on, and I'm having troubles with the Database section.

    I get these errors :

    Database connection information did not work.

     SQLSTATE[HY000] [1045] Access denied for user

    I also cannot connect to phpMyAdmin, Xampp is what I am using as my stack.

    None of these errors have occurred before which is annoying me to say the least.

    Help is appreciated ?

  4. 3 minutes ago, flydev said:

    Can be, wrong hostname, wrong MySQL port number, wrong username, wrong password.

     

    Double check your DATABASE connection details and double check your config.php file.

    Everything was working beforehand, all I've done is change one file and I get that error. I shall check just to make sure

  5. Hi,

    So I'm working on my site, getting round to completing it. I remember that I haven't checked at all what it will be like on other devices, so that's my next task.

    I went to the index page and I get hit with this error:

    Fatal error: Exception: SQLSTATE[HY000] [2002] Connection refused (in /var/sites/b/mysite.org/public_html/wire/core/ProcessWire.php line 377) #0 /var/sites/b/mysite.org/public_html/wire/core/ProcessWire.php(209): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #1 /var/sites/b/mysite.org/public_html/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config)) #2 {main} in /var/sites/b/mysite.org/public_html/index.phpon line 64

    All I have done from the last code update was change a links target to blank, pushed the update and tested it. Now my site is broken? Went back and changed to the original file and I'm still getting the error.

    I really don't understand what has happened. I am an ok {6 months} web developer with this being my first experience of PW.

    All help is appreciated ?

  6. Hi,

    So I am a complete beginner with PW, just finishing up my first site, and I need to get my site online to do some final testing. Got all the FTP stuff sorted and I'm getting a internal server error when access my domain.

    I transferred over all files from processwire-master, and even when I am on local host I get sent to the index of my site, where I then click on processwire-master to be taken to my site.

    Where did I go wrong?

    Thanks!

×
×
  • Create New...