Jump to content

vxda

Members
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by vxda

  1. Hi guys, im building vuejs page which connects to my processwire website.
    Ajax call goes to api/rest/item-list/page[number]. Its all working fine if the page im requesting is not larger then 3 digit. 

    so api/rest/item-list/page999 works fine, but as soon as i want to get api/rest/item-list/page1000 and over i get 404. The funny thing is that when im checking url in the browser tab im getting correct results.

    What can be the issue here?

    Thanks.

  2. Worst is that most of the magic is on the backend where noone can see ;).
    Great thing is that processwire is so flexible and allows you to to combine backend with frontend in perfect ways.

    Happy to work with you :)

  3. Hi guys im still thinking about this topic and i have an idea of how i want to do this, question is ... is it possible and if is whats the best way to achieve it.

    Site structure:
    MAIN SITE

       ARTICLES

          article-1

          article-2

          article-3

       PAGE PARENT FOR SLAVE PAGE 1

          cloned-article-1

          cloned-article-2

       PAGE PARENT FOR SLAVE PAGE 2

          cloned-article-3

    When im adding article to my article parent there are checkboxes (pageField):
    - clone to PAGE PARENT FOR SLAVE PAGE 1
    - clone to PAGE PARENT FOR SLAVE PAGE 2

    On save, the article is saved to parent pages i choose with those checkboxes.
    On SLAVE SITE 1 there is a cron job every day that will grab articles from MASTER SITE -> PAGE PARENT FOR SLAVE PAGE 1 and create thoes pages on SLAVE SITE (title, body, images);
    and same goes for SLAVE SITE 2

    Now how can i achieve this? rss feed? some jsonp?

    Is there a way to grab pages from different site and create them in other?

  4. I read this article :https://processwire.com/api/modules/multi-site-support/

    and i think 1st option is good since you have seperate folders and admin page. I just wonder if theres a way to push pages to another site.

    ie. Im on the master site.

    If (checkbox on the page is checked ) {

       on page save -> create page on the sub-page and populate all fields/images with given template and in given parent.

    }

    is this possible? or should i just use option 2 of multisite?

  5. Im using :
     

    <a href="<?php echo $pages->get(ID_OF_PAGE)->url; ?>">
       <?php echo $pages->get(ID_OF_PAGE)->title; ?>
    </a>
    

    This way i get page that i want, i can change its name and title from inside admin panel. This way i dont have to go in code every time i want change title or parent of the page

    • Like 1
  6. Most advertising providers just use get variables to track where someone has clicked an ad. So as long as you can dictate the url you could also count all visits coming with specific variables.

    Yes i know i could user parameter in url for that but i would want to have other ways of doing that and:

    $ref = $_SERVER['HTTP_REFERER'];

    Does the job :) so thank you guys.

    Meaby i will use both ways to be sure :P

    Thank you.

  7. Is it possible that this module shows also files in subfolders of /site/templates ?

    Im usualy developing site like this

    some_template.php <--- here i include "articles/article-list.html";

    so in my templates folder i have

    Templates

          articles folder

               article-list.html

    some_template.php

    and this module for translations grabs files that are in templates folder only without any subfolders. So i have to manualy type in path of files.

     

×
×
  • Create New...