Dave Burke : Online Community and Social Business Specialist

SiteUrl CSControl - One More Time! For Site Articles

Site articles are Content Parts, and in CS2007 (and prior, though I don't know how far back) they can be displayed on a single page.  The /themes/[theme]/content/content.aspx page can be used to format the articles just the way you like them.  I haven't used this feature so my demo page isn't all pretty the way it should be, but it gives you the idea of what a site article page looks like.

 


The url of a Site Article is http://mysite/content/contentpartname.aspx.  The contentpart name is shown on the administrative Manage Articles page.




The url for my What's New content part would be http://mysite/content/whatsnewbox.aspx.  

And now the information you've been waiting for, how to use a SiteUrl CSControl to link to a Site Article!  The SiteUrls.config item to display a content part is contentpart_articlename.


<url name="contentpart_articlename" path="{0}.aspx" pattern="##contentName##\.aspx" vanity="{2}?contentname=$1" physicalPath="##themeDir##" page="content.aspx" />


So our link would look like the following, where we pass the contentpartname as Parameter1.

<CSControl:SiteUrl UrlName="contentpart_articlename" ResourceName="myArticleLinkText"  runat="server" Parameter1="whatsnewbox" />


As Forrest Gump would say, "That's all I have to say about the SiteUrl CSControl."

Comments (5) | Post RSS RSS comment feed

Posted on 6/18/2007 4:39:45 PM by Dave Burke
Categories: Community Server
Tags:

Related posts

Comments (5) -

6/19/2007 11:26:35 AM Permalink

Ugh.  Now, see, I'm really not trying to be dense here, but I have no idea where to put the .  This series doesn't seem to address -- at all -- the original post, which was asking "How to get the hyperlink to the article -- in the normal "blue nav bar" -- to highlight when you're visiting the article."  You know, the blue bar on the CS-based site's home page that says "Home Blogs Photos Downloads Control Panel", etc.

It's stuff like this (the lack of easy "configurability") that makes people stay away from CS.

Dustin |

6/19/2007 11:28:43 AM Permalink

Perhaps I should have said, "Explain it to me like I'm a two year old.  What files do I edit, where do I reference the code, etc."

I do appreciate your efforts, don't get me wrong, but it's just not what I'm asking for.

Dustin |

6/19/2007 11:34:23 AM Permalink

Hey, Dustin!  Not a problem.  The point of confusion is that I'm extending the question to relate to the SiteUrl CSControl.  You asked specifically about the navigation bar, and that wouldn't change from the original reply.  That is, you add the link to the /content/contentpartname.aspx in the section of the siteUrls.config file.
Email me if you still have questions.

daveburke |

6/19/2007 5:20:45 PM Permalink

We keep going around on this one. Smile

I've added the following to SiteUrls.config:


Now, the Getablog.aspx page is, of course, virtual (an article), so what do I add to it (via online editing) or to its master (and which master, and where do I put it) to make the placed in SiteUrls.config actually light up when you're on that particular page?

Dustin |

6/19/2007 6:44:47 PM Permalink

I hope tonight's "light up" post answered your question.  Let me know if it doesn't!

daveburke |


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke

Copyright © 2013 Dave Burke.  All Rights reserved.