Is this done by creating a custom URL re-writer? XSLT? Usercontrol? I'm on a mission and would be more than happy to share my code as a result of any help.
I'm not using wild card mapping yet since I'm still in development (i use this on most my sites and it works great!). I think the one feature that Umbraco needs is easy to setup Member Profile pages.
our.umbraco.org actually uses that feature. What happens here is that the umbracoProfileUrl is set to "member". Then there is a page in the content section called "member" that has a macro on it. When you visit the url /member/1234, in this macro you get the member id like this:
Of course, this uses the ID of the member, but I imagine that if you write /member/mike then your would get the membername in the httpitem. Then you would have to do you own lookupof the member since there is not an xslt extansion for it at the moment. Look for this method:
The line <xsl:variable name="memId" select="umbraco.library:GetHttpItem('umbMemberLogin')"/> will return both numeric MemberId's as well as Member Login Names like you stated.
Ex: site.com/profiles/mike.aspx returns mike
and site.com/profiles/1091.aspx returns 1091
So now I'm left with making my own XSLT extension to return MemberId's from Member Names.
My current XSLT looks like this (for testing) and seems to be working great (though it can't validate).
Looking for help with Member profiles for community system
Hi fellow umbracians,
Looking for some clues to creating an online community Umbraco application.
Specifically I need help with converting a member profile into an actual visible page.
For example:
http://site.com/profile/mike.aspx ;
http://site.com/profile/mike (directory friendly url)
Is this done by creating a custom URL re-writer? XSLT? Usercontrol? I'm on a mission and would be more than happy to share my code as a result of any help.
Hi Mike,
How did you configure umbraco/iis for that site? Is it configured to use directory urls already? If so, then you're set, no more changes!
Do you want some code sample on how to create that 'mike.aspx' page using the api? Check these wiki pages
If you'd like to go for the directory urls solution, here's a thread that might be of great help. (Look for Roel's answer)
Cheers,
/Dirk
Hi Dirk,
I'm not using wild card mapping yet since I'm still in development (i use this on most my sites and it works great!). I think the one feature that Umbraco needs is easy to setup Member Profile pages.
It looks like it's built in:
404handlers.config has this:
<notFound assembly="umbraco" type="SearchForProfile"/>
web.config has this:
<add key="umbracoProfileUrl" value="profiles.aspx" />
So I'm wondering if Umbraco automatically handles urlrewriting for Member names.
For example:
http://site.com/profiles/membername.aspx (which isn't a document in the content tree but auto generated)
Just was hoping someone has done this already.
Hi Mike
our.umbraco.org actually uses that feature. What happens here is that the umbracoProfileUrl is set to "member". Then there is a page in the content section called "member" that has a macro on it. When you visit the url /member/1234, in this macro you get the member id like this:
And then you can get member info like this:
Of course, this uses the ID of the member, but I imagine that if you write /member/mike then your would get the membername in the httpitem. Then you would have to do you own lookupof the member since there is not an xslt extansion for it at the moment. Look for this method:
Hi Morton,
That's exactly what I needed!
I also found this post to be very helpful http://umbraco.org/documentation/books/not-found-handlers/the-standard-umbraco-not-found-handlers
The line <xsl:variable name="memId" select="umbraco.library:GetHttpItem('umbMemberLogin')"/> will return both numeric MemberId's as well as Member Login Names like you stated.
Ex: site.com/profiles/mike.aspx returns mike
and site.com/profiles/1091.aspx returns 1091
So now I'm left with making my own XSLT extension to return MemberId's from Member Names.
My current XSLT looks like this (for testing) and seems to be working great (though it can't validate).
Sometimes XSLT doesn't validate when passing variables to extension methods, because the variables have no values a design time.
If you want to see the complete XML for the member you get back, write it out like this:
And then view your macro on a page. It will write out the XML to the source of your page.
is working on a reply...