Hand coded detail links and permalinks.

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 16, 2014   (RSS)

By rconring - May 9, 2014

Is it possible to programmaticaly create permalink URLs since I am not using the internally generated links  (_link)?  Using one index.php page, I pass several variables in the url in order to distinguish different styles and types of pages ... list or detail etc.  Eg: /index.php?pg=3 would use page and sidebar elements for category 3 which includes a product list page.   /index.php?pg=3&item=12 is the detail page for an item on page 3.  The link is constructed programmatically from the list code as such:

      <?php 
          $pname = str_replace(' ','-',$precord['name']);
          $pname = strtolower($pname);
          $prodLink = '/index.php?pg='.$precord['category'];
          $prodLink .='&item='.$precord['num']; 
          $prodLink .='&'.$pname ; 
      ?>      

Then I am getting the variables from the URL with:

  $pageNum = isset($_REQUEST['pg']) ? $_REQUEST['pg'] : null;
  $detailNum = isset($_REQUEST['item']) ? $_REQUEST['item'] : null; 
  if(!$pageNum)$pageNum = 1;

I have all of this working well but before I go any farther with this concept, I need to know if the permalinks plugin is going to work with this concept in any way.

I guess what I am after is a way to manually access the permalinks database and create my own version of a cross reference.

Does any of this sound feasible?

Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987