Skip to content

Commit

Permalink
Merge pull request #70 from ventrian/latest-news
Browse files Browse the repository at this point in the history
Latest news
  • Loading branch information
skamphuis authored Feb 2, 2022
2 parents 2cf6c8d + da6bd91 commit 9304d93
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
7 changes: 5 additions & 2 deletions App_LocalResources/LatestArticlesOptions.ascx.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="LatestArticlesHelp.Text" xml:space="preserve">
<value>In this section, you can adjust the settings for the "Latest Articles" module.</value>
Expand Down Expand Up @@ -675,4 +675,7 @@
<data name="TemplateSaves.Text" xml:space="preserve">
<value>Template Saves</value>
</data>
<data name="ImageTitle.Text" xml:space="preserve">
<value>The tile for the image of the article, displays nothing if no image selected.</value>
</data>
</root>
12 changes: 12 additions & 0 deletions Components/Layout/LayoutController.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,18 @@ Namespace Ventrian.NewsArticles
End If
End If

Case "IMAGETITLE"
If (objArticle.ImageCount > 0) Then
Dim objImageController As New ImageController
Dim objImages As List(Of ImageInfo) = objImageController.GetImageList(objArticle.ArticleID, Null.NullString())

If (objImages.Count > 0) Then
Dim objLiteral As New Literal
objLiteral.Text = objImages(0).Title
objPlaceHolder.Add(objLiteral)
End If
End If

Case "IMAGECOUNT"
Dim objLiteral As New Literal
objLiteral.Text = objArticle.ImageCount.ToString()
Expand Down
8 changes: 8 additions & 0 deletions LatestArticlesOptions.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,14 @@
<asp:label id="lblImage" resourcekey="Image" cssclass="Normal" runat="server" enableviewstate="False"></asp:label>
</td>
</tr>

<tr valign="top">
<TD class="SubHead" width="150">[IMAGETITLE]</TD>
<td class="Normal" align="left" width="325">
<asp:label id="lblImageTitle" resourcekey="ImageTitle" cssclass="Normal" runat="server" enableviewstate="False"></asp:label>
</td>
</tr>

<tr valign="top">
<TD class="SubHead" width="150">[IMAGELINK]</TD>
<td class="Normal" align="left">
Expand Down
9 changes: 9 additions & 0 deletions LatestArticlesOptions.ascx.designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9304d93

Please sign in to comment.