0

SEF 機能を備えたコンポーネントを新規に開発します。

route.phpの次のクエリを渡します

JRoute::_('index.php?com_example&view=profile&layout=item_interestonme&id='.$itemval["profile_id"]); 

route.php では、

$query display Array ( [Itemid] => 114 [option] => com_example ) 

それだけ。ビュー、レイアウト、id は表示されません。この問題を解決する方法。

4

1 に答える 1

0

There is a preprocess method in the Router-interface, defined like this:

 /**
 * Prepare-method for URLs
 * This method is meant to validate and complete the URL parameters.
 * For example it can add the Itemid or set a language parameter.
 * This method is executed on each URL, regardless of SEF mode switched
 * on or not.
 *
 * @param   array  $query  An associative array of URL arguments
 *
 * @return  array  The URL arguments to use to assemble the subsequent URL.
 *
 * @since   3.3
 */
public function preprocess($query);

You could try to override this in route.php. Perhaps the display-parameter is stripped from the query in the default implementation?

于 2016-06-16T20:03:52.693 に答える