Hello,
what is the best and easy method (eating least server sesources) to add a HTML code into just one or a few specific category pages?
I have 1k categories and I want to add one hard link into let's say "Cartoon" category page, just to 1st page ranked by CTR.
What would be your suggestions?
How to include HTML into special category pages only
Re: How to include HTML into special category pages only
Check $_GET parameters, it's fast.
Don't forget to run script update
Re: How to include HTML into special category pages only
If my page looks like this:
http://www.lazymike.com/popular/cartoon ... 82x1464449
There is nothing to $_GET from it.
What would you suggest in this case?
http://www.lazymike.com/popular/cartoon ... 82x1464449
There is nothing to $_GET from it.
What would you suggest in this case?
Re: How to include HTML into special category pages only
what do you mean ?There is nothing to $_GET from it.
Don't forget to run script update
Re: How to include HTML into special category pages only
I mean I don't have ?group_name=cartoon so I can't use $_GET['group_name'] = 'cartoon'; as my URL is http://www.lazymike.com/popular/cartoon ... 82x1464449
What do you suggest?
What do you suggest?
Re: How to include HTML into special category pages only
I thought about using this, but not sure if it is server resources friendly
Code: Select all
<?php
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (false !== strpos($url,'popular/cartoon/1.html')) {
include("./file.html");
}
?>Re: How to include HTML into special category pages only
I suggest you to add something likeSpyCam wrote:I mean I don't have ?group_name=cartoon so I can't use $_GET['group_name'] = 'cartoon'; as my URL is http://www.lazymike.com/popular/cartoon ... 82x1464449
What do you suggest?
print_r($_GET);
and find out that you actually have $_GET parameters.
Yes, php code is friendly.
Don't forget to run script update
Re: How to include HTML into special category pages only
OK, this code also works:
But it works for all pages under cartoon category, and i want just 1st page ranked by CTR.
Do I need more if conditions to add or it is better/faster to use just strpos like I already use?
Code: Select all
<?php
if ($_GET['group_name'] = 'cartoon') {
include("./file.html");
}
?>Do I need more if conditions to add or it is better/faster to use just strpos like I already use?
Re: How to include HTML into special category pages only
check $_GET['page']
Don't forget to run script update
Re: How to include HTML into special category pages only
Code: Select all
<?php
if ($_GET['group_name'] = 'cartoon' && $_GET['order'] = 'ctr' && $_GET['page'] = '1') {
include("./file.html");
}
?>






