- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPortfolioDetails.vbhtml
More file actions
Latest commit
65 lines (60 loc) · 3.22 KB
/
Copy pathPortfolioDetails.vbhtml
File metadata and controls
65 lines (60 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@Code
' Handle user request to swap theme
IfNotRequest.QueryString("Theme")IsNothingThen
DimswapToAsString=Request.QueryString("Theme")
InitializeApplication.SwapTheme(swapTo)
EndIf
Layout=Helpers.SetTheme().ToString
' get values
DimsearchQueryAsString=ApplicationSecurity.ValidateInput(Request.QueryString("Query"))
DimitemAsInteger=ApplicationSecurity.Decode(Request.QueryString("ItemID"))
' Get data
DimuserDatabaseAsString=InitializeApplication.DataConn()
DimdatasourceAsDatabase=Database.Open(userDatabase)
DimsqlQueryAsString="SELECT Item_Title, Item_Tagline, Item_MetaKeywords, Item_MetaDescription, Item_FeaturedImage, Item_FeaturedImageAlign, Item_FeaturedImageCaption, Item_Image1, Item_Image2, Item_Image3, Item_Image4, Item_Image5, Item_Body, Item_Created FROM webpages_Portfolio_Items WHERE Item_Active = 'Y' And Item_ID = @0"
Dimrs_portfolio=datasource.QuerySingle(sqlQuery,item)
' Get page meta
DimstrTitleAsString
DimstrDecriptionAsString
DimstrKeywordsAsString
IfNot(rs_portfolio)IsNothingThen
strTitle=rs_portfolio("Item_Title")
strKeywords=rs_portfolio("Item_MetaKeywords")
strDecription=rs_portfolio("Item_MetaDescription")
Else
strTitle=HttpContext.Current.Application("DefaultKeywords")
strKeywords=HttpContext.Current.Application("DefaultTitle")
strDecription=HttpContext.Current.Application("DefaultDescription")
EndIf
PageData("Title")=strTitle
EndCode
@SectionMeta
<metaname="Keywords"content="@strKeywords"/>
<metaname="Description"content="@strDecription"/>
EndSection
<divclass="app-content">
<divclass="row">
<divclass="row-itemdetails">
<divclass="center-wrapper">
@If(rs_portfolio)IsNothingThen
@<h1>Theitemisn't available.</h1>
Else
@<text><divclass="col-md-12">
<divclass="item-details">
<hgroupclass="title">
<h1>@rs_portfolio("Item_Title")</h1>
</hgroup>
@Ifrs_portfolio("Item_Tagline")<>""Then
@<h3>@rs_portfolio("Item_Tagline")</h3>
EndIf
<divclass="item-date">@Strings.Format(rs_portfolio("Item_Created"),HttpContext.Current.Application("DateFormat"))</div>
<divclass="item-featured_img @rs_portfolio("Item_FeaturedImageAlign")"><imgsrc="Portfolio_Images/@rs_portfolio("Item_FeaturedImage")"alt="@rs_portfolio("Item_Title")"/><divclass="item-featured-caption">@rs_portfolio("Item_FeaturedImageCaption")</div></div>
@Html.Raw(StringExtensions.HighlightText(rs_portfolio("Item_Body"),searchQuery,"searchtexthighlight","Search?Query="))
</div>
</div>
</text>
EndIf
</div>
</div>
</div>
</div>