I have a need to render content from another page using a content query web part. I've found several examples on how to accomplish custom fields using common-view-fields but nothing specific on how to query page content from another page.
Is this possible?
Thanks,
Eric
"Content Query Webpart" is typically used for aggregation - you have a lot of pages in your portal and you want to create a page which summarizes the headlines or some other properties that every item in your portal has.
In your scenario, as far as I understand, you have a page in your portal and you want to create another page, which displays the same content. In this case the "List form webpart" or a "data view webpart" would sound more reasonable.
Related
I need to send by email the link of the contents in a custom Portlet in Liferay.
How can I obtain the URL for every content my portlet shows?
It possible to make it in the view or have to be an Action to create the URL?
Thanks in advance
"The link of content" does not really map to Liferay concepts: You have content and that content can be displayed on any number of pages. You can either try to find one page where the content is displayed, or (for Web Content) use the "Content Display Page" which chooses a particular page as the context for this article.
If you are using a custom ADT, you might want to add it to your question, so that we know what you're talking about. If it's too long, feel free to simplify it.
I used EpiServer CMS. I'm just wondering if n2cms has any attribute to collect links. (like LinkItemCollection in EpiServer). If not, Please give me an idea to implement.
Reference: http://sdk.episerver.com/library/cms6/Developers%20Guide/Core%20Features/Properties/How%20To/Use%20Link%20Collection%20property.htm
Thanks.
You could do this with the ContentList part and creating a bunch of redirect pages. This is best if you want to re-use the collection of links again and again.
Create a dummy placeholder page somewhere, and make it invisible.
Under that placeholder page, create a Redirect page for each link.
Where you want the collection of links to appear, drag & drop a ContentList and point the root at the dummy placeholder page. You can then write a custom HTML template to display the link however you like.
One other idea would be to use N2CMS Selection part, which gives you a checkbox list of all the pages in your site. You simply check the ones you want to list, and Selection will format a list of all the pages you checked.
With both of these methods, if you link to other pages in your site, N2 will offer to update links for you if you rename any of the target pages (as long as they're in the same N2 site).
All of this is documented in the N2CMS documentation here: https://n2cmsdocs.atlassian.net/wiki/display/N2CMS/Linking+to+Content?src=search
Look under the heading Dynamically Linking to Content Items
So I have a basic (Wordpress powered) portfolio site where most of the content lives on the homepage, and then I'm using a custom posts category for the featured projects, so users can click through and get more info on the project at its category-single.php page. So the idea is it's a pretty flat site in terms of structure.
So flat, in fact, that the site navigation in the header simply links to content that is all on the home page (About, Work, What, Contact are all sections on the home page that get scrolled down to when you click).
What I want to happen is when the user is on the home page, and clicks one of the top nav links, the page scrolls down to that section (no problem here - I've got this part working just fine), and then when the user is on another page of the site (think one level deep, a custom post page) if they click the header nav links it returns them to the homepage and scrolls them down to that section. I'm thinking in terms of basic url anchor structure, like http://somesite.com/page#specific_section where that link takes the user to a specific section on somesite.com/page.
However the trouble I seem to be having is with creating these url's correctly. I've written them as mysite.com#about, mysite.com#work, mysite.com#contact, mysite.com#page-top, but instead of trigging the user to go to the homepage, the browser is interpreting those links as instructions to look for those sections on the current page.
What am I doing wrong, and what is the correct way to accomplish this?
The thing I'm trying to consider additionally, is whether I need to create PHP logic that displays the links one way on the homepage, and another way on the rest of the site.
What you need to do is use the actual filenames of the pages in question, like:
mysite.com/aboutme.html#qualifications
`mysite.com/portfolio.html#ZirTech
For links to the homepage, try either using the root relative path or fully qualifying the link like so:
http://www.mysite.com/#section fully qualified
/#section relative path
You shouldn't need to implement them a different way on the homepage - just implement them properly throughout the site.
When you write the URLs as mysite.com#work, mysite.com#contact, mysite.com#page-top the browser looks for the page in question, because it is not instructed to go to another page (you need to add "/" to redirect it).
If you want them to point to the main page, set them as
mysite.com/index.php#work, mysite.com/index.php#contact, mysite.com/index.php#page-top
Maybe it is possible without index.php, but I'm a bit lazy to test now:
mysite.com/#work, mysite.com/#contact, mysite.com/#page-top
What's the best way of showing site usage statistics in a page? I know I can view the stats from /_layouts/SpUsageSite.aspx and from designer also, but if I want to show this information in a customized way for a target audience, how can I show this data in a page? at least I need to show "recently visited pages".
You need to use the SharePoint class for return reports. See the SPUsage class on MSDN (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spusage.aspx)
thanks all but I solved my problem quite easily, I simply used
spweb.GetUsageData(SPUsageReportType, SPUsagePeriodType)
didn't know SPWeb has such method, its enough for my requirement.
thank you #Chris SPUsage is also one solution I think, I'll try it next time
From the SP main page, go to the Site Actions, Site Settings, Modify All Site Settings and then select site Usage reports under the Site Administration column.
Once the page loads and shows you the stats. copy the url out of the browser and then ad that to a List or annoucements and then add that to your page as a web part with a hyper link to the stats report.
you could also create a new web-page and then insert an I-frame object with the stats report url and then link the new page to the parent site using a List.
I would like to know if there is a way when using Google custom search engine to have Google CSE link to a page with a URL like this
http://www.mysite.com/mysection/mysectionarticles.html#myarticle234
or something close to that.
Let’s say Google would find the searched words in a certain part of the page it could be in a or after an anchor or something like that and would supply in the search result a way to link to this specific section of the page.
So if you have big pages the user wouldn't have to scroll through the page to find the relevant part he saw in the CSE snippet.
It could also be used if you have a dynamic page that change state using JavaScript. Part of the page is hidden to the user until he does an action in the pages, but this hidden content was indexed by Google because it’s part of the page. So when the user clicks on the link in the search result he ends up on a page and can’t find the relevant part because it’s hidden.
Take a look at Google's support for structured/rich data and ajax urls for crawling (aka hash-bangs). One or both of them ought give you access to the pages with the right things displayed.