2016-10-18, 00:04:47
Hello all,
I'm trying to create a simple plugin, something like catalog..
I've tried to change title by doing
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:
+
Thanks for any feedback !
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 !