如何在ISML级别创建没有PGID的链接?
以下代码非常适合避免网址中的会话ID,但仍会在网址末尾添加PGID。
#sessionlessurl(Action(TargetPipeline))#
答案 0 :(得分:3)
我相信你不能用sessionlessurl
做到这一点,我也认为没有可以做到的ISML功能。但是有一个自定义标记用于生成规范链接,您也可以使用它。该标记称为issetcanonicallink
。这是代码示例:
<issetcanonicallink
scope="request"
name="CanonicalLink"
action="ViewStandardCatalog-Browse"
parameters="#ParameterList(Parameter('CatalogID', CategoryBO:CatalogBO:Name), Parameter('CategoryName', CategoryBO:Name))#">
<link rel="canonical" href="<isprint encoding="off" value="#CanonicalLink#">" />
实施SetCanonicalLinkTag
位于core
盒式磁带中,相应地记录了参数。
答案 1 :(得分:0)
我目前创建一个没有sid和pgid的网址的解决方案是:
CREATE TABLE orders
(
DateCreated datetime,
OrderID int,
Price float,
Months int
);
INSERT INTO orders
VALUES ('2013-03-05', 1, 49.9500, 12),
('2013-04-01', 2, 5.9500, 1),
('2013-04-08', 3, 7.1100, 12),
('2013-05-15', 4, 42.9500, 3),
('2013-06-12', 5, 13.9850, 6),
('2013-06-27', 6, 7.1100, 6),
('2013-07-29', 7, 21.92500, 3)
;WITH MTHS AS (SELECT dateADD(day, -DAY(MIN(datecreated)) + 1, MIN(datecreated)) MD, (SELECT MAX(dateadd(month,o2.months, o2.datecreated)) FROM ORDERS o2) AS MXD FROM Orders
UNION ALL
SELECT DATEADD(month,1,MD), MTHS.MXD FROM MTHS WHERE DATEADD(month,1,MD) < MTHS.mxd),
JOINER AS
(
select MD, ord.price / ord.months mlyprice from MTHS
JOIN ORDERS ord ON dateadd(day, -day(ord.datecreated) + 1, ord.datecreated)
BETWEEN
dateadd(month,1-ord.months,MTHS.md )
AND
MTHS.md
)
SELECT J.MD,SUM(mlyprice) FROM JOINER J GROUP BY J.MD
随意添加一个使用更少JSP的更好的:) 缺少URLParameters,但您可以轻松地在JSP部分中添加它们。