Accessing a page with a tag

Topics: Themes
Mar 23, 2009 at 10:11 AM
Hi i'm a newbie in blogengine.

I have create a page and i would like to add a href in the sidepane.ascx to go to this page.
How can i do ?
Many thanks
Mar 23, 2009 at 5:56 PM
What version of BE are you using?

Your page should have a URL that you can add a hyperlink to.  When you pull up your page in the browser, see what the URL is in your browser's address bar.
Mar 23, 2009 at 6:12 PM
I use BE 1.5
I habe added an about page with AddPage in admin mode.
I have a theme with a sidebar control and i would like to add a hyperlink under my Photo to reach this page.
For now I have solve the problem in adding codebehind in C# file "SidePanel.ascx.cs":

public partial class User_controls_SidePanel: System.Web.UI.UserControl
  protected void Page_Load(object sender, EventArgs e)
    foreach (BlogEngine.Core.Page page in BlogEngine.Core.Page.Pages)
      if (page.Title == "MyName")
        HyperLinkAbout.NavigateUrl = page.AbsoluteLink.ToString();

I was hoping i could use a <% %> tag in the ascx file accessing a BlogEngine variable  to make the same thing. Is it possible ?
Many thanks for your help
Mar 23, 2009 at 10:45 PM
When you create a page in the control panel, you can give your page a 'slug'.  Slug is one of the fields on the Pages tab in the control panel.  If the slug you give the page is "about", then the URL to the page should be:

Or something similar to that.  The important thing is that the URL to the page will always be the same as long as you keep the same slug.  So, all you need to do inside SidePanel.ascx is add a link like this:

<a href='<%= Utils.RelativeWebRoot + "page/about.aspx" %>'>About Me</a>
Mar 25, 2009 at 2:10 PM
Many thanks Ben.
I was not able to understand what the term "Slug" was standing for in french.
Now i understand what we can do with htis attribute.
I'll try your solution.

Another thing. I have implement a Tag Cloud extension initially available in Wordpress.
Take a look at Do you think it can interest other people ?

Thanks again