Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris K 15 posts 36 karma points
    Dec 18, 2012 @ 23:05
    Chris K
    0

    "Read More" on article previews?

    First off, thanks so much for the work put in to uBlogsy. It's a great application.

    Is it possible to have a "Read More" link after the preview on the Blog landing page? I think I had read a post from a while back that said this feature was coming and that it could be done with jQuery, just not sure how that would be done.

    I was considering spending some time to write something in XSLT, but I'm wondering if there is known way to handle this that I'm not finding by search. If this has been answered fully elsewhere, I apologize; I have not seen it.

    Thanks...

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Dec 19, 2012 @ 12:22
    Anthony Dang
    0

    Do you want to link off to the page, or do you want the article body to just appear under the summary on click of the read more link?

     

  • Chris K 15 posts 36 karma points
    Dec 19, 2012 @ 16:04
    Chris K
    0

    I am looking to link off to the page. At the moment, I have saved the post and then gone back in and manually typed a hyperlink to that page in the summary field as a workaround. I was curious if anyone had done anything with this before I spent too much time recreating the wheel.

    Thanks for your reply!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Dec 19, 2012 @ 16:09
    Anthony Dang
    0

    The heading of the post is already a link. You can just copy and paste that part of the macro. Instead of a H1/H2, change it to a div or a span.

    Do a search for uBlogsyContentTitle. It should be pretty obvious what you want to copy and paste.

     

     

  • Chris K 15 posts 36 karma points
    Dec 19, 2012 @ 17:01
    Chris K
    0

    Yep, that's defintiely why I was looking at the title for reusing for a link. Good to know I'm going the right direction.

    Thank you so much for pointing me in the right direction and saving me time mapping it out. The template implementation in to the existing site was surprisingly easy and you've done a fantastic job with the whole tool. Thanks again for the support.

  • Chris K 15 posts 36 karma points
    Dec 19, 2012 @ 18:53
    Chris K
    0

    Just as a final follow up, this is a full explanation of how I ultimately produced the results that I was looking for, in case someone who is not familiar with coding would like to do the same thing:

    I wanted the " view full post >>" text after my Summary (on the landing page) to direct to the full post.  This variable is already supplied in uBlogsyShowPost.cshtml as @d.Url. I didn't want to just paste my hyperlink in to the post body after "@RenderPostBody(d)", because that would cause it to show up in the Summary and in the actual post bottom as well. To do this, I had to add to the code for the hyperlink in "@helper RenderPostBody" in the if-else statement for the Summary section only.

    The 3 additional lines of code read as below, after the original, top line:

    <code>

    @Html.Raw(d.GetProperty("uBlogsyContentSummary").Value)

    @Html.Raw("&nbsp;<a href=\"")

    @Html.Raw(@d.Url)

    @Html.Raw("\">view full post >>")

     </code>

    I know this is painfully obvious to some people, but hopefully to others it will be a timesaver. Thanks again for the directions to get started on the customization!

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Dec 19, 2012 @ 21:26
    Anthony Dang
    0

    More concisely you could have done it like this:

    <a href="@d.Url">view full post</a>

     

    Think of razor as html with some things in it to get your data.

     

     

  • Chris K 15 posts 36 karma points
    Dec 19, 2012 @ 22:56
    Chris K
    0

    Indeed. I was getting errors when I tried something similar, so I had abandoned that idea. That is much better. I must've had a character out of position that I wasn't noticing. Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft