• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Surfscience
#1 Posted : Wednesday, November 5, 2008 4:12:03 PM(UTC)
Surfscience

Rank: Member

Joined: 2/7/2006(UTC)
Posts: 66

A client has posed a good question that my limited .NET capabilities can't solve. On the custom.aspx page, I'd like the page title to not include the store's name suffixed on the end of the page title. This is because, like many people he's including a sell string (FREE DELIVERY ON ALL ORDERS etc. etc.) in the store name. On his custom pages he'd like to create some none sales driven content to help with SEO and doesn't want the information pages tainted with his sales sounded string. I don't like making changes to the core but it looks like that string gets built there. Any way round this, just through the .aspx and .vb pages?

Any help always appreciated!

Matt
[email protected]
#2 Posted : Wednesday, November 5, 2008 4:43:04 PM(UTC)
info@cpapsupplyusa.com

Rank: Member

Joined: 7/21/2005(UTC)
Posts: 320

One way to do it... Set the pagetitle from custom.aspx.vb. Right now, the title is being pulled from the database.
Editing custom and changing it will make ALL of your custom pages have the same title... so this may not be exactly what you want.

It's one way though...


Code:

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Me.Page.Title = WebAppSettings.SiteName
'CHANGE THE LINE ABOVE TO BE WHATEVER YOU WANT
End Sub



Code:
Private Sub LoadPage(ByVal bvin As String)
Try
If bvin.Length() > 0 Then
Dim p As Content.CustomPage = Content.CustomPage.FindByBvin(bvin)
Me.Page.Title = p.Name
lblName.Text = p.Name
lblContent.Text = p.Content

Me.MetaDescription = p.MetaDescription
Me.MetaKeywords = p.MetaKeywords

Else
Me.lblContent.Text = "unable to load page id " & Server.HtmlEncode(bvin)
End If
Catch Ex As Exception
'msg.ShowException(Ex)
End Try



Probably not the most elegant solution. We try to create all new pages when doing custom pages, and don't use the database features.
M. Hall
CPAP Supply USA

http://www.cpapsupplyusa.com
Surfscience
#3 Posted : Thursday, November 6, 2008 11:04:04 AM(UTC)
Surfscience

Rank: Member

Joined: 2/7/2006(UTC)
Posts: 66

Hi Tim,

I appreciate the input. Unfortuantely, from a CMS perspective the client likes that they can create their own pages without any web designer intervention. The custom page is a good way to do this so I can't really go down your route of real pages for this content. I knew I could knock out the code that generated the title but then I lose the use of the page title from the CMS side of the page. The perfect solution would just be a way to access the title used by the custom page's record without tagging the storename on the end. Maybe not possible without some serious intervention unless anyone knows otherwise.....?
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012