those odd links in the footer

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.
6/19/2010 3:28:01 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

those odd links in the footer

I swear, I have searched for info about this all over this site, and I just can't find it.  Those links in the footer that look like:

 
                                <portal:SiteMapLink ID="SiteMapLink1" runat="server" CssClass="sitemaplink" />
                                |
                                <portal:SkinPreview ID="SkinPreview1" runat="server"></portal:SkinPreview>
                                |
                                <portal:XhtmlValidatorLink ID="lnkw3cValidator" UseImage="false" runat="server" Html5="false" />
                                |
                                <portal:CssValidatorLink ID="lnkCSSVal1" UseImage="false" runat="server" />
 

I don't understand how these work, what the names attached to those IDs refer to, or really, anything about them.  I read the page about content that's the same on multiple pages, because I have another link I would like to add to these -- my privacy policy, adapted from one of my other sites.  I've created a page for it and saved it, but I don't want the link for it in the regular content menu -- which I figured out when I created the page -- but I want it to appear in the footer, on every page, so, after reading the doc page about content on multiple pages, I added this:

(the privacy policy page is module ID 4)

                           <portal:ModuleWrapper ID="mdl4" runat="server" ConfigureModuleID="4" />

But nothing shows up -- why?  I'm surely doing something wrong, since I have no earthly idea WHAT I'm doing with this, so how I get it so that the title of the page and the link shows up?

Flummoxed,

Andria

6/19/2010 7:08:37 AM
Gravatar
Total Posts 18439

Re: those odd links in the footer

Hi Andria,

You can think of the layout.master as kind of a skeleton for the page, it contains a mixture of html markup and ASP.NET controls which are the ones like <asp:, and then there are some custom ASP.NET controls that start with the prefix <portal: and you may occasionally see other prefixes. All the custom controls have their tag prefixes registered in the Web.config file in the <pages><controls> section. There are basically 2 kinds of custom controls, UserControls and ServerControls, the main difference is that UserControls correspond to .ascx file on disk and are loaded a little differently while Server controls are just compiled into dll(s) in the /bin folder and don't have any .ascx file associated with them.

Anyway that is just the technical background, at runtime these controls render html markup depending on what they were designed to do. For example the control:

<portal:SkinPreview ID="SkinPreview1" runat="server"></portal:SkinPreview>

just renders a link with the correct url for the current page and it appends ?skin=printerfriendly

We just use a clean empty skin for printable view, the skin=x parameter appended to a page url can actually be used to preview any skin but we used it here to implement printer friendly views.

Some controls such as those in the footer are optional and can be removed entirely from layout.master without breaking anything but some are more important and must be there like divLeft, divCenter, and divRight and some others.

You are free to add any hard coded html markup into the layout.master for anything you want to appear on every page used by the skin. So you could hard code a link to your privacy page or any other link you want, we just have some built in controls that are convenient for some common things but all they do is render some markup, you can add markup directly and if you don't like the markup from the convenience control you are free to remove it and replace it with custom markup. You can also use relative urls with some .NET code mixed with markup like this so you don't have to hard code the full url, this is how my privacy link in the footer of this site is made in layout.master:

<a href='<%= Page.ResolveUrl("~/privacy.aspx") %>'>Privacy Policy</a>

note that it is important those outer quotes be single quotes because it has double quotes needed in the function.

I'd recommend avoid use of <portal:ModuleWrapper control, it has a purpose in certain situations but I avoid using it myself.

Note also that it is possible to use different skins on different pages of a site, there is a setting to enable it in site settings.

Anyway hope that sheds a little light.

Best,

Joe

6/19/2010 8:38:57 PM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: those odd links in the footer

Awesome -- that "page.resolveurl" thing is terrific!

Also, in response to that other thread, regarding right/left placement of the menu -- thank you, I might have found that at some point, but god knows how long it would have taken!

Back to the odd footer links -- I think I need to study this "control" idea that I keep finding in asp.net; it appears to be one of the fundamentals, which I, not having a lick of experience with asp.net, have no knowledge of whatever.  I keep running into walls with asp.net, like, "webform" -- "MVC" -- "UserControl" -- etc.  The thing is, I'm not really sure how to find a good tutorial on this stuff -- every one I've seen so far, seems to assume one has some knowledge of what a "userControl" might be, and how to make one -- I'm at sea with all of it, and don't know where to start looking -- I'm not even really sure what it is that I'm looking FOR.

Thx!

Andria

 

6/21/2010 12:26:15 AM
Gravatar
Total Posts 147
Download Free Mojo Skins http://crypticsites.net

Re: studying asp.net

Thought I would answer my own post; I've found a tutorial at http://www.w3schools.com/aspnet/aspnet_intro.asp so I'm pursuing that, at the moment; it appears to be extremely high-level, especially if one already knows HTML -- and here I thought that knowledge was out-dated!  heh  But it appears that, armed with strong knowledge of HTML and knowledge of these "controls", there really isn't much I can't do, using Mojo.  Sweet!

Back to it... wink

Andria

10/10/2011 5:06:07 PM
Gravatar
Total Posts 1

Re: those odd links in the footer

Joe,

Thanks so much for the Forums.  Just bought you a beer for the Page resolver for the Privacy page link in the footer.  That is perfect.

AndriaD, thanks for asking the question.

 

Dave

10/11/2011 10:52:20 AM
Gravatar
Total Posts 18439

Re: those odd links in the footer

Hi Dave,

Thanks for the beer! Much appreciated.

I can see from your order that you live near my old stomping grounds.

Cheers,

Joe

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