Jump to content

floridaDev

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

floridaDev's Achievements

Jr. Member

Jr. Member (3/6)

0

Reputation

  1. When I redirect urls using .htaccess file the page gets redirected along with additional IT= paramaters that I want removed. Example: Redirect 301 /page-one/ /page-two/ The page gets redirected to website.com/page-two/?it=page-one Looking though the .htaccess file I see the following line is active RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] Removing it=$1 makes my redirects go to index.php How can I properly get these pages redirected without the trailing IT=<page-url> Thanks
  2. How does one change the page it's redirected to after submission.
  3. Below is just an example of how I'm currently calling pages that start with the letter "M". I'm doing this for A-Z and my template file has the script below x 26 times. Is there anyway this could be improved? $m_links = ""; $find_m_pages = $page->children("template=article, City^=M"); //if pages exist build the outer ul. if($find_m_pages->count()) { $m_links .="<li id='m'><ul>"; //build the single li links foreach($find_m_pages as $m) { $m_links .= '<li><a href="'.$m->url.'">Link</a></li>'; } $m_links .= "</ul></li>"; } else { //nothing exist just leave it blank $m_links .= ""; }
  4. I have 2000 pages. On each page I would like to display 20 links to the other 2000 pages. Each page cannot have the same set of links as another page. I'm trying to come up with a solution where my team doesn't have to manually put in 20 links for these pages. What I had in mind is using the selector below to grab the next 20 links and so fourth.. $page->nextAll($selector, $siblings) Does this seem like a good PW method? My second option was to just query the DB directly and grab links in sets of 20. Thanks,
  5. I have a particular template that has 10 text fields and 10 images. The goal is that whichever text is inserted into text field #1 it'll display underneath image #1. I'm having trouble retrieving the images for that page as an array. I've tried var_dump($page->images) and the output is the pages entire fieldset..not just only images.
  6. Hello I have parent pages that have thousands of child pages (1k-3k pages). On my template page I have 15 query's that look like the following: <ul> <?php $id = $page->id; $pid = $page->parent->id; $locationData = $page->get("LocationData"); $pgType = $page->get("PageType"); $pbPages17 = $pages->find("parent=$id, id!=$id, PageType=E4,start=850,limit=50"); foreach($pbPages17 as $pbPages17) { ?> <li><a href="<?php echo $pbPages17->url; ?>"><?php echo $pbPages17->get("LocationData");?></a></li> <?php } ?> </ul> I'm concerned the way I'm calling these child pages are slowing down the page that their listed on. Is there a better way of doing so? Thanks
  7. That did it, thanks a lot. I didn't realize you can include parameters like that in the $pages selector.
  8. I'm having some difficulties returning the sibling pages that have the same field value. <?php #SET VARS $locationData = $page->get("LocationData"); # Get Sibling pages, except current one $sibPages = $page->siblings("id!=$page"); # For each them foreach ($sibPages as $sP) { # Return Sibling pages that share the same "LocationData" field value $sP = $pages->find("LocationData=$locationData"); # Another Loop foreach($sP as $sPP) { echo $sPP->title .'<br />'; } } ?> Page structure Parent Page - Child Page1 (locationData=foo) - Child Page2(locationData=bar) - Child Page3(locationData=foo) - Child Page4(locationData=foo) My desired output would be if I'm on child page 1, to return child page3, and child page4 because they have the same identical field value and are also a sibling page. Instead the output returns me Child page 1, child page 1, child page 3 child page 3, child page 4, child page 4 while being on child page 1. I understand this is happening because of my 2 foreach loop's but I'm not sure how to filter by $page then filter again by $pages. TL;DR My end goal is to return sibling pages with the same field value, except the current page
  9. What should my csv header be to just upload pages at the minimum? edit: I found the answer to my question. title,myfield1,myfield2 titleA,myfield1_value,myfield2_value titleB,myfield1_value,myfield2_value titleC,myfield1_value,myfield2_value
  10. Hi All, My csv file is as follows, headers= page_id, title, body, url. data=100,hello world, hello world again, hello-world. Once uploaded it returns the error "Missing required fields" What am I missing?
×
×
  • Create New...