Link Item Collection in n2cms - asp.net-mvc

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

Related

jquery mobile multi-page internal hyperlinking

This appears to be pretty basic but I can't figure it out.
Using a jqm multipage template, I'm trying to allow users to jump from a link one page (id='page1') directly to an image in another page (id='page2').
FIDDLE
It appears I am constrained, by html hyperlinking rules and jqm, to this:
<a href='#page2'>go to image on p2</a>
... which of course jumps the user to the top of page2.
But that's not what I want. I want the user to jump directly to the IMAGE, which is close to the bottom of page2, tagged like so:
<img id='image-id'>
But tagging the link with the image's id (not the page's id), i.e. tagging it like this
<a href='#image-id'>go to image on p2</a>
doesn't work.
I get the feeling I'm missing something very obvious, but can't figure it out.
Any suggestions? Or is this not possible?
I've got a different problem but found this question in my travels... thought I would add an extract from the jquery mobile page:
http://demos.jquerymobile.com/1.4.5/navigation-linking-pages/
Note: You cannot link to a multipage document with Ajax navigation active because the framework will only load the first page it finds, not the full set of internal pages. In these cases, you must link without Ajax (see next section) for a full page refresh to prevent potential hash collisions. There is currently a subpage plugin that makes it possible to load in multi-page documents.

Joomla - Wrong url path from google results

I have a strange problem in one Joomla website.
If i access from homepage and then navigate into the site it works correct, but if i go in some internal page from google results it shows uncorrect page layout, because the url is not correct.
This is the correct url
Correct page from homepage
and this the uncorrect url that Google finds Uncorrect page from Google
in this second page is showed rating module (that i never used) instead of an article, as you can see in links.
Someone can help me?
EDIT: I'm using Joomla 2.5 version. Every menu item is category blog type, and must show all articles of one category. Each category have 2 articles. In the uncorrect link seems that it access to single article, adding the rating that i have hidden in each article
Which version are you using?
if you can turn on SEF option in the global settings in joomla admin. Then you need to make sure all your articles are in menus. then if you link them on different pages it should keep the url the same.
The way you have it at the moment with all the x=123&... get params pages will show for what ever ids you change the menu to.
The reason you are seeing an uncorrect layout is the two different Itemid parameters (the right url has 127 while the wrong one has 104). The rest of the difference in the urls will be ignored by Joomla.
Solution: Find your menu item with id 104 (look at the menu ids on the right of the menu items view), then check which modules appear on the page from there. There may be modules in non-visible positions.
One of these modules is publishing the links with the wrong ids. If it's a Joomla core (like a search module) you can usually force the Itemid either in the module or in the component's configuration. Else you need to fixsome third party code.
Only once you have solved the multiple-itemid should you turn on SEF, otherwise you'd get the same problem only more difficult to trace.
sh404 could help you with this, I'd give it a try on a test site to see if it gets you out of trouble faster.

Using Page Anchors In Primary Site Navigation

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

content query web part to display content from another page

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.

Linking to a specific section of a page from Google custom search engine result

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.

Resources