English 中文(简体)
直接面包车连接特定网页
原标题:Redirect breadcrumb link to specific page

在我网站的每一页上,我都有比页数更长的链接。 我想做的是改变这一联系,这样,当它属于“家庭”、Events>Example 时,活动链接会将用户转往一个活动页而不是一个类别页。

因此,简言之,在一分钟,点击事件的面包车链把你带往事件的某页。 相反,我想让用户看到一个具体活动页。

这样做的最佳方式是什么? 我最初的想法是,编辑第3-3.php,以复制活动页,但还是有更好的办法? 我想为整个事件与面包店连接的地方的每一种情况做这项工作。

Thanks in advance.

问题回答

没有看到面包店的法典 我不得不作一些假设。 我认为,它通过一个文字,在纸面结构的基础上建造面包店。 如果你发现,你可以做些什么,也假定事件涉及一个特定类别,而后者总是一样。

因此,如果你发现漏洞,找到能够把事情联系起来的变量,你可以效仿这个例子:

//crumb would be the variable that helps to build the entire bread crumb in the loop through .=
//e.g. $mainBreadCrumb.=$crumb each time the loop makes a pass

$crumb =  <a href="index.php/category-3.php/">Events</a> ;

$crumb = str_replace("<a href="index.php/category-3.php/">Events</a>", "<a href="eventspage.php">Events</a>", $crumb);

这应当再次得到完成,假设原来的工作是 面包店连接不会改变。 如果你需要进一步帮助,把面包.放在后。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签