Get current username etc in normal HTML content

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
8/9/2010 8:36:24 AM
Gravatar
Total Posts 8

Get current username etc in normal HTML content

Hi,

Really like MojoPortal and are trying to get up to speed with development but don't want to rush it so I'm trying to learning it slowly and properly.

So I have made a bit of "quick and dirty" solution and I have a small .net application for register players for an weekly floor ball event here in Dublin and I'm showing my app as an IFrame. I want to have a register link from an normal HTML Content module and I want to build the link with the username. Is this possible from within a HTML content module?

i.e 

<a href="test/username?username=$USERNAME$">link</a>

Been looking around in the documentation and searching the forum here but have not found anything yet that have helped me. Basically I want to pass on some data to the app in the IFrame. Any suggestion other than my solution?

 

Cheers,

Stefan 
dubswedes.com (community for Swedes in Dublin)

8/9/2010 8:51:13 AM
Gravatar
Total Posts 18439

Re: Get current username etc in normal HTML content

No,it is not possible from the html module. If the user is authenticated you could determine the user from code in a custom feature, where you could build the url for the iframe, but that requires some development skill. It is not an administrative task.

Best,

Joe

8/9/2010 8:27:34 PM
Gravatar
Total Posts 47

Re: Get current username etc in normal HTML content

you can create an ascx control as joe mentioned and try 'context.user.identity.name' [http://msdn.microsoft.com/en-us/library/system.web.httpcontext.user.aspx] to get the logged in user

hope it helps

nitin

8/17/2010 4:39:03 AM
Gravatar
Total Posts 8

Re: Get current username etc in normal HTML content

Hi and thanks for the replies!

I guess I have to get started with the development and make my module the correct way!

 

Maybe not the right forum but do you know if anyone working on  creating a "template" for mojoPortal and Visual Studio so you can Add New "mojoPortal module"?

 

Cheers,

Stefan

8/17/2010 5:39:34 AM
Gravatar
Total Posts 47

Re: Get current username etc in normal HTML content

Hi Stefan,

As Joe mentioned above, visit http://www.mojoportal.com/hello-world-developer-quick-start.aspx to get an idea of how to start.

hope it helps,

nitin

You must sign in to post in the forums. This thread is closed to new posts.