Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION How to alter urls and title ?
#1
Lightbulb 
Hello all,

I'm trying to create a simple plugin, something like catalog..

I've tried to change title by doing


PHP Code:
global $title;
$title "new title"

but this doesn't work..
another thing is, what is the best way to implement url structure in GS ?


I'm using something like this:

Code:
RewriteRule ^catalog/(.+)?\/(.+)?\/(.+)?$ index.php?id=catalog&main=$1&sub=$2&detail=$3 [QSA,L]
RewriteRule ^catalog/(.+)?\/(.+)?$ index.php?id=catalog&main=$1&sub=$2 [QSA,L]
RewriteRule ^catalog/(.+)?$ index.php?id=catalog&main=$1 [QSA,L]
+
PHP Code:
if (isset($_GET['id']) && $_GET['id']=="catalog") {
 
   if(!empty($_GET['detail'])) {
 
       add_filter('content''detail_list');
 
   }
 
   elseif(!empty($_GET['sub'])) {
 
       add_filter('content''sub_list');
 
   }
 
   elseif(!empty($_GET['main'])) {
 
       add_filter('content''main_list');
 
   }
 
   else add_filter'content''all_list' );


Thanks for any feedback !
Reply


Messages In This Thread
How to alter urls and title ? - by morvy - 2016-10-18, 00:04:47
RE: How to alter urls and title ? - by shawn_a - 2016-10-18, 03:12:53
RE: How to alter urls and title ? - by morvy - 2016-10-18, 04:00:34
RE: How to alter urls and title ? - by shawn_a - 2016-10-18, 09:17:52
RE: How to alter urls and title ? - by morvy - 2016-10-18, 16:24:28
RE: How to alter urls and title ? - by Bigin - 2016-10-18, 17:21:17
RE: How to alter urls and title ? - by morvy - 2016-10-18, 17:44:23
RE: How to alter urls and title ? - by Bigin - 2016-10-18, 18:25:48
RE: How to alter urls and title ? - by morvy - 2016-10-18, 20:57:57
RE: How to alter urls and title ? - by shawn_a - 2016-10-18, 21:48:41
RE: How to alter urls and title ? - by morvy - 2016-10-18, 21:54:46
RE: How to alter urls and title ? - by shawn_a - 2016-10-18, 23:41:21
RE: How to alter urls and title ? - by shawn_a - 2016-10-18, 23:57:15
RE: How to alter urls and title ? - by morvy - 2016-10-19, 06:40:43
RE: How to alter urls and title ? - by trantulong - 2019-10-01, 16:56:34
RE: How to alter urls and title ? - by Felix - 2019-10-02, 00:40:07
RE: How to alter urls and title ? - by Oleg06 - 2019-10-02, 03:06:37



Users browsing this thread: 1 Guest(s)