Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest news #70

Merged
merged 2 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -535,6 +535,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.