/    Sign up×
Community /Pin to ProfileBookmark

Linking to content on another page

Hi Guys
I have a few pages on my website that have alot of content on so I use <a name=”test”></a> and link to that to navigate around the page by having a link such as <a href=”#test”>Click</a>

But now I want to have a link on one page, directing users to some content halfway down another page, the link was “/test.php” and I have tried “/test.php/#test” but this didn’t work.

How can I do this please?

Thanks, Adey

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@DanInMASep 30.2011 — try /test.php#test
Copy linkTweet thisAlerts:
@gk53Sep 30.2011 — not "/test.php/#test"

just "/test.php#test"
Copy linkTweet thisAlerts:
@newskyOct 01.2011 — The portal has two pages: - title page with asset publisher portlet displaying list of latest content items (abstracts view) - news page, with asset publisher portlet displaying list of content items and other portlets allowing filtering by tags, categories etc.

We want that after clicking in title page on web contents title or 'read more' link, the user is redirected to the news page and the gets details view of the web content he ckicked.

The implementation #

Here is a patch that uses value of 'linked layout' asset publisher preference. The patch changes value of viewURL so that it links to the 'linked layout' page. The patch finds the first asset publisher portlet on that page and makes it display the clicked web content.

*** C:projektailibliferaysvn6.0.6portal-webdocroothtmlportletasset_publisherdisplayabstracts.jsp 2011-02-02 12:37:49.687482300 +0200 --- C:Tempapabstracts.jsp 2011-03-24 10:13:58.310179800 +0200 *************** *** 54,59 **** --- 54,100 ---- String viewURLMessage = viewInContext ? assetRenderer.getViewInContextMessage() : "read-more-x-about-x"; viewURL = _checkViewURL(viewURL, currentURL, themeDisplay); + + // get linked page uuid + String linkToLayoutUuid = GetterUtil.getString( + preferences.getValue("portlet-setup-link-to-layout-uuid", null)); + + if(linkToLayoutUuid!=null && !"".equals(linkToLayoutUuid)) { + // get linked layout + Layout linkedLayout = null; + try { + linkedLayout = LayoutLocalServiceUtil.getLayoutByUuidAndGroupId( + linkToLayoutUuid, themeDisplay.getScopeGroupId()); + } + catch (PortalException pe) { + pe.printStackTrace(); + } + if (linkedLayout!=null) { + // find first AssetPublisher portlet on that layout + LayoutTypePortlet detailLayoutTypePortlet = (LayoutTypePortlet)linkedLayout.getLayoutType(); + List<Portlet> allPortlets = detailLayoutTypePortlet.getAllPortlets(); + String portletId = null; + for (Portlet p: allPortlets) { + if (PortletKeys.ASSET_PUBLISHER.equals(p.getRootPortletId())) { + portletId = PortletKeys.ASSET_PUBLISHER + PortletConstants.INSTANCE_SEPARATOR + p.getInstanceId(); + break; + } + } + if (portletId!=null) { + // make an url to this portlet + PortletURL portletURL = new PortletURLImpl(request, portletId , linkedLayout.getPlid(), PortletRequest.RENDER_PHASE); + + portletURL.setParameter("struts_action", "/asset_publisher/view_content"); + portletURL.setParameter("assetEntryId", String.valueOf(assetEntry.getEntryId())); + portletURL.setParameter("type", assetRendererFactory.getType()); + portletURL.setParameter("groupId", String.valueOf(assetRenderer.getGroupId())); + portletURL.setParameter("urlTitle", assetRenderer.getUrlTitle()); + + viewURL = portletURL.toString(); + viewURL = HttpUtil.setParameter(viewURL, "redirect", PortalUtil.getLayoutURL(linkedLayout,themeDisplay)); + } + } + } %> <c:if test="<%= show && assetRenderer.hasViewPermission(permissionChecker) %>">

Mua ban nha dat
Copy linkTweet thisAlerts:
@NguyetNgatranSep 16.2018 — Bạn đang tìm chọn một can ho Q7! Bạn mong muốn tận hưởng những tiện ích hấp dẫn nhất tại Tp.HCM.

Mời bạn đến với dự án quận 7 Sài Gòn Riverside, dự án căn hộ cao cấp tọa lạc ngay tại trung tâm thành phố.

http://canhoq7saigonriverside.info/
Copy linkTweet thisAlerts:
@Tungduong009Sep 16.2018 — Căn hộ Quận 7 Sài Gòn Riverside

Bạn đang tìm chọn một can ho Q7! Bạn mong muốn tận hưởng những tiện ích hấp dẫn nhất tại Tp.HCM.

Mời bạn đến với dự án quận 7 Sài Gòn Riverside, dự án căn hộ cao cấp tọa lạc ngay tại trung tâm thành phố.

Dự án quận 7 Sài Gòn Riverside

Tổng quan dự án:

Sài Gòn Riverside là dự án căn hộ cao cấp tiện nghi với không gian sống hài hòa với thiên nhiên và hệ thống tiện ích hấp dẫn nhất khu vực.

Dự án có tổng diện tích là 75.224,5 m2. Được thiết kế bao gồm 5 gồm 5 khối tháp được lấy cảm hứng từ những hành tinh Venus, Saturn, Mercury, Uranus và Mars. Các có 34 tầng và 3.580 căn hộ với diện tích từ từ 53m2-66m2-73m2-86m2.

Vị trí vương trạch:

Can ho quan 7 Saigon Riverside là dự án hiếm hoi tại Thành Phố Hồ Chí Minh sở hữu mặt tiền Đường Đào Trí, trước mặt là sông Sài Gòn mênh mông, xanh mát.

Đặc biệt dự án nằm liền kề khu đô thị Phú Mỹ Hưng và kết nối với các tuyến đường huyết mạch của thành phố bao gồm: Nguyễn Tất Thành, Nguyễn Thị Thập, Huỳnh Tấn Phát, Nguyễn Lương Bằng, Nguyễn Văn Linh. Bạn chỉ mất 15 phút để đến trung tâm thành phố.

Căn hộ Sài Gòn Riverside

Can ho q7 Saigon có thiết kế độc đáo với khe sáng hoặc mặt thoáng để tối ưu khả năng đón nắng, đón gió tự nhiên.

Thêm vào đó là không gian sống thanh lịch hiện đại cùng hệ thống nội thất cao cấp với: cửa gỗ căn hộ của Melanmine chống cháy khóa từ 3 trong 1, sàn gỗ cao cấp chuẩn châu Âu, thiết bị vệ sinh Toto, thiết bị điện Panasonic, bộ nội thất phòng bếp Malloca, hệ thống điều khiển thiết bị điện thống minh BKAV Smarthome cảm biến tự động…

Bạn có thể tham khảo chi tiết thông tin dự án tại website: canhoq7saigonriverside.info.

Hệ thống tiện ích hấp dẫn bậc nhất

Tiện ích ngoại khu:

Với lợi thế về vị trí tọa lạc ngay trung tâm thành phố và cách khu độ thị Phú Mỹ Hưng chỉ 2km. Tại Riverside Sài Gòn bạn chỉ mất 5 phút để đến cầu Ánh Sao, bệnh viện Pháp Việt, bệnh viện Tim Tâm Đức, trường quốc tế Việt Úc, trường quốc tế Canada, Trung tâm Thương mại SC VIVO City, trung tâm thương mại Cressent Mall….

Tiện ích nội khu:

Là du an q7 nổi bật nhất hiện nay, Sài Gòn Riverside tích hợp hệ thống hơn 50+ tiện ích hiện đại, đồng bộ và khép kín. Với đầy đủ khu TTTM, khu nhà hàng, coffe, khu thể thao đa năng, khu spa nghỉ dưỡng, bể bơi trong nhà, phòng tập Gym…

Bạn cũng đừng bỏ quên thả mình trên cây cầu tình yêu Riverside & quảng trường nghệ thuật Symphony nằm ngay trong lòng dự án.

Hãy tận hưởng những tiện ích sống bậc nhất cùng can ho Q7 Sài Gòn Riverside!

Liên hệ ngay Hotline: 0988.889.245 - 0932.867.862 hoặc để lại tin nhắn tại website canhoq7saigonriverside.info để được tư vấn miễn phí 24/24h.

http://canhoq7saigonriverside.info/
Copy linkTweet thisAlerts:
@rootSep 16.2018 — {"locked":true}
×

Success!

Help @djadejones spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...