Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
Top Story

 

First page Previous page 1 2 Next page Last page  View All


simonwh
User

Nov 4, 2006, 6:10 PM

Post #1 of 37 (6390 views)
Shortcut
Top Story Can't Post

Hi

I've looked at this thread:
http://www.interactivetools.com/iforum/Products_C2/gforum.cgi?post=49946
As I want to do something similar within AM2

BUT

I want to be able to select whether a story is a 'featured' or 'top' story or not.

In AM1 I created an artfield with a drop down menu for yes/no. If yes was selected the story was featured as 'top story' and configured with a separate template.

I've created a 2nd rule in AM2 that configures the top story correctly but at the moment it's ignoring the yes/no selection. and just showing the most recent story at the top.

How can I edit the rule to only feature a story in the top slot if I've selected it?

Thanks


simonwh
User

Nov 5, 2006, 4:11 PM

Post #2 of 37 (6353 views)
Shortcut
Re: [simonwh] Top Story [In reply to] Can't Post

??


simonwh
User

Nov 6, 2006, 3:02 PM

Post #3 of 37 (6337 views)
Shortcut
Re: [simonwh] Top Story [In reply to] Can't Post

Any ideas with this one yet?


Dave
Staff / Moderator


Nov 7, 2006, 3:57 PM

Post #4 of 37 (6322 views)
Shortcut
Re: [simonwh] Top Story [In reply to] Can't Post

Simon, sorry for the delay! We missed your post. But don't worry - I found it again. :)

I'm not very clear on what you're trying to do.

Generally what you do is create a checkbox field (make sure it's field type is "Int") in the field editor. Then sort by that field in the table editor (like this: -top, date, etc). The - means to sort in reverse and checkbox fields have 0 for unchecked and 1 for checked so you want to sort the 1's first.

Next, you can use a templateIf in your regular template to test if a story is featured or not and show different html.

Does that help any? If not, give me more details about what you're trying to do and what's not working and I'll try again.

Dave Edis - Senior Developer
interactivetools.com


simonwh
User

Nov 8, 2006, 12:34 AM

Post #5 of 37 (6311 views)
Shortcut
Re: [Dave] Top Story [In reply to] Can't Post

Hi

I'm not quite clear about all the steps required to achieve this.

I already have the checkbox and I've made it an 'init' and given it a value of 1.

I want to specify whether an article is to be given 'special' treatment and displayed as a Top Story in the global index. I created a separate template to configure how it is displayed and I created a rule to process it. The resulting output (topstory.html) is pulled into the global index with an SSI call.

However I think I need to edit the rule that creates topstory.html so that it only includes the latest article that I have specified to be a Top Story.

Is this possible?

(the reason for doing it this way is so that I can display the top story then display a banner advert then the normal article headlines - ie split the headlines list into two sections)


Dave
Staff / Moderator


Nov 8, 2006, 1:15 PM

Post #6 of 37 (6293 views)
Shortcut
Re: [simonwh] Top Story [In reply to] Can't Post

It's totally possible.

A few things to check, make sure your (articleList) rule that publishes the top story has "Limit Results" set to 1 to 1. And that sorting at the bottom is sorting by your top story field (in reverse) at the bottom.

Give it a try and let us know how it goes.

Dave Edis - Senior Developer
interactivetools.com


klausre
User

Nov 8, 2006, 1:47 PM

Post #7 of 37 (6290 views)
Shortcut
Re: [Dave] Top Story [In reply to] Can't Post

Hi, I'm looking for the same feature, but don't have a clue how to get or set up rule etc. to get this to work. Can you give me some tips simonwh/dave?


Theo
Project Manager / Moderator


Nov 10, 2006, 3:52 PM

Post #8 of 37 (6258 views)
Shortcut
Re: [klausre] Top Story [In reply to] Can't Post

Klause,

It depends on what you're looking to do...there are actually a few different things discussed in this thread.

  • If you simply want to sort your "featured" articles first, then you should be able to just check the "Featured" checkbox in your articles. If they aren't being sorted first, make sure that the featured field is an Integer (go to Admin > Database Editor, click "edit table and fields" for articles, and check that the "displayed/stored as" column says "checkbox / int"

  • If you want to have different formatting for the first article in your articleList, a "top story" style, then you simply need to add a quick templateIf to the template that tests based on the $articleList.currentResultNumber$.

    For example, with the following code, your first article will have a border and background color, and a small "Top Story" caption at the tope. I simply added the two templateIf's at the top of this section (the example code is base on the default code for the articleRow).


    Code
    <!-- templatecell : articleRow --> 
    <!-- templateIf : $articleList.currentResultNumber$ == "1" -->
    <div class="summary" style="background-color:#ffe;border: 1px solid #f90;padding: 10px;">
    <small><b>Top Story</b></small><br clear="all">
    <!-- /templateIf -->

    <!-- templateIf : $articleList.currentResultNumber$ > "1" -->
    <div class="summary">
    <!-- /templateIf -->

    <span class="summary_breadcrumb"><!--#include virtual="$published.categoryBreadcrumb.webpath$" --></span><br>

    <a href="$published.articlePage.url$" class="summary_title">$article.title$</a>
    - <span class="summary_date">$article.date$</span><br>

    $article.summary$

    <div class="summary_link">
    <!-- templateIf : $article.attachments$ ne "" -->
    <div class="summary_attachments">
    <b style="color: #666666;">Download attachment(s):</b> $article.attachments$
    </div>
    <!-- /templateIf -->

    [ <a href="$published.articlePage.url$">Read More...</a> ]


    <br clear="all"></div>
    </div>
    <!-- /templatecell : articleRow -->



  • I hope this helps you get going, klausre! Just modify the code in the first templateIf to suit the design you want for your Top Story.

    Give it a try, and let us know if you need any help tweaking it! :)


    Theo Wiersma
    Project Manager


    klausre
    User

    Nov 12, 2006, 12:51 PM

    Post #9 of 37 (6233 views)
    Shortcut
    Re: [Theo] Top Story [In reply to] Can't Post

    Theo, this is in my direction. Here's what I whant:

    2. Have the latest stories from every category listed by date. This will use a tumb version from the “summarypic1” picture.


    5. Have the newest “top-/feature story” displayed (just the one). This will use the original uploaded pictures for “summarypic2”.
    6. Have the latest 2 or 4 “top-/feature stories” (without the latest one) displayed. This will use a tumb version from the “summarypic2” picture.


    I also like to have some ads between as you can see.

    Hope you can give me some help her T.
    Attachments: mfn1.jpg (208 KB)


    ross
    Staff / Moderator


    Nov 13, 2006, 2:18 PM

    Post #10 of 37 (6203 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi Klausre.

    Thanks for the screenshot!

    I wanted to go over things just a little bit more though so I'll address each point, one at a time Smile.

    2. No sweat on this one. Listings articles by date already happens by default. We might just need to change the publish rule a little so it doesn't always start with article number 1 as that would be used for the articles at the top of your main list. We'll come back to this one in some more detail once we get the bigger items crossed off the list.

    5. For this section, was it going to be one "top-/feature story" article for the entire site? So regardless of what category you are on, that article is still the same, or was there going to be one "top-/feature story" for each category?

    6. Same sort of thing here. Was the 2 or 4 "top-/feature story" articles going to change from category to category?

    If you could get back to me on this, that would make it much easier to walk you through everything. Don't worry though, Article Manager 2 is so customizable, you'll definitely be able to get something like this going.

    Oh, and one last thing, the ads between articles won't be a problem. That's just a little bit of coding on your template to do this. Again, we'll come back to this after the bigger items are crossed off.

    I look forward to hearing from you Smile.
    -----------------------------------------------------------
    Cheers,
    Ross Fairbairn - Product Specialist
    support@interactivetools.com


    Hire me!
    Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.




    (This post was edited by ross on Nov 13, 2006, 2:19 PM)


    klausre
    User

    Nov 14, 2006, 4:33 AM

    Post #11 of 37 (6172 views)
    Shortcut
    Re: [ross] Top Story [In reply to] Can't Post

    Thanks so far Ross.

    Here's the replay:

    2. Yes, I also think it's best to exclude out the ones that are listed on/as "top stories" for the "normal" story-listing on the front index page. It will definite give the best and most professional look (and not show the same story twice). But when a "top story" are replaced whit a newer one (and it's for ex. number 5 in the line - if we have total 5 top stories on the front, 1 big and 4 small), then it should be a normal article on the front page (if this specific story have a publish date that normally make it show one the front page. In between the range of the 7-8 stories listed as number 2 i the screenshot).

    (Top stories should be displayed at the top even if it's older then the ones that are listed in the range of the 7-8.)


    (Just a small question om how AM2 works: For the summary-pictures that I have made to separate field upload for. Can this pictures be inserted directly just be include that field - or does AM require publish special rules for it?)

    5. The sreenshot illustrate the "main index front page", and the story is the latest top story regardless what ever category it is related to. I should display the one latest "top story" and display it only on the "main index front page".

    6. Yes, It would be cool to have the 2-4 latest top stories in that specific category display as in the shot on the top. And then show the latest stories as in number 2 below this - except for the 2-4 ho are top stories at the top.

    One the "main index front page" it should display (if 4 small top stories listings) top story number 2,3,4 and 5 regardless what ever category it are related to.

    I'm not 100 present sure that I expressed my self here correct here, but did you get any smarter? I'm not the best in story telling in English Crazy


    (This post was edited by klausre on Nov 14, 2006, 4:35 AM)


    Damon
    Staff / Moderator


    Nov 15, 2006, 4:43 PM

    Post #12 of 37 (6142 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi klausre,

    I'm going to put together some steps for you tomorrow.

    Also you had previously asked setting up related articles.

    Take a look at this tutorial for Adding a list of related article to each article page:
    http://www.interactivetools.com/docs/doc.cgi?/articlemanager2/tutorials/related_articles.html

    Cheers
    Damon Edis
    interactivetools.com


    burnworld
    User

    Nov 17, 2006, 8:40 PM

    Post #13 of 37 (6104 views)
    Shortcut
    Re: [Damon] Top Story [In reply to] Can't Post

    I want to be posted on these steps as well.


    klausre
    User

    Nov 20, 2006, 4:28 AM

    Post #14 of 37 (6071 views)
    Shortcut
    Re: [Damon] Top Story [In reply to] Can't Post

    Hi D.

    I know you have enough to do ;) But have put anything together yet? Thanks!


    Damon
    Staff / Moderator


    Nov 20, 2006, 12:26 PM

    Post #15 of 37 (6055 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi,

    Sorry for the delay and thanks for your patience. :)

    I was able to re-create the layout you want on an internal test site over the weekend, now I just have to put the steps together for you in a tutorial.

    I'm out of the office today, but I will work on the tutorial tonight and post it in the morning.

    Cheers
    Damon Edis
    interactivetools.com


    klausre
    User

    Nov 20, 2006, 12:34 PM

    Post #16 of 37 (6054 views)
    Shortcut
    Re: [Damon] Top Story [In reply to] Can't Post

    I just have to say that you're support is all over my expectation!!! I'm so glad I went for AM2 and became a part of you're costumers :)

    Thanks, and thanks for helping me create a custom and good site!


    Damon
    Staff / Moderator


    Nov 21, 2006, 2:00 PM

    Post #17 of 37 (6026 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Okay, here is the steps to create a top story page with ads. I'm still fine tuning the steps so let me know if anything is unclear or missed.

    Add an article field for a Summary Image image:
    1) Go to Admin > Database, and click "edit table & fields" for Articles.
    2) Add Field (button on the bottom right)
    3) Field Label is "Summary Image", Name is "summaryImage", and Field Type is "upload".
    4) Under Database Options - Stored as "memo"
    5) Under Field Options - select the "single file" radio button
    6) Input Validation - these settings are compelled optional
    5) Click Save, then you'll be back on the Table Editor page where you can update the Field Order to where you want this upload field to appear on the edit article page.
    6) Add a templateIf to the templates you want the "Top Story Image" image to be published in.
    I have attached both templates to this post with the code included as examples:
    /templates/articleLists/globalIndex.html
    /templates/articleLists/categoryIndex.html

    Upload the both templates in the /articleLists/ directory.


    Add custom template for included articles:

    Upload the attached template globalIndex_articlelist_includes.html template to here:
    /templates/articleLists/globalIndex_articlelist_includes.html

    This template will be used to publish the additional articles that will be included.


    Add Publishing Rules for additional articles to include
    1) Admin > Publishing
    2) Create button (bottom right of page)

    Create rule for Articles 4 - 7:
    Rule Name: Include articles 4 - 7
    Rule Description: articles to be included on Front Page
    Rule Type: a list of articles
    Template: articleLists/globalIndex_articlelist_includes.html
    Placeholder Set Name: include_articles_4_7
    Rule Options:
    Published Files > One File radio button - Filename: include_articles_4_7
    Limit Results: 4 to 7
    Advanced Options:
    Always Publish: checked
    Subcategory Articles: checked

    In the Advanced Commands dropdown list (bottom left of page), choose "Copy Rule (save changes)".

    Create Articles 8 - 10
    In the Copy of rule, just change the following (everything else can stay the same):
    Rule Name: Include articles 8 - 10
    Placeholder Set Name: include_articles_8_10
    Rule Options:
    Published Files > One File radio button - Filename: include_articles_4_7
    Limit Results: 8 to 10
    Save.

    Publishing Ads to Front Page using My Placeholders

    Go to Admin > My Placeholders.
    Add globalAdOne for the "Placeholder Name" then for "Placeholder Value" add whatever content you like.
    Repeat this for globalAdTwo.
    Save.


    Before re-publishing your Global Index and Category Indexes, add some Summary Images to existing current articles or create some new ones.

    Note: In Admin > General Settings, you can set the two image sizes: regular size image (resizes images that are larger than to a set size) and thumbnail image.

    Example of custom Front Page:


    I hope this helps. Let me know if you have any questions. Also, if you use this method, let me know, I would love to see it in action. :)

    Cheers
    Damon Edis
    interactivetools.com

    (This post was edited by Damon on Nov 22, 2006, 11:36 AM)
    Attachments: globalIndex.html (7.69 KB)
      categoryIndex.html (4.39 KB)
      globalIndex_articlelist_includes.html (1.59 KB)
      customized_frontpage.jpg (79.6 KB)


    klausre
    User

    Nov 22, 2006, 11:06 AM

    Post #18 of 37 (6006 views)
    Shortcut
    Re: [Damon] Top Story [In reply to] Can't Post

    Hi. I'm trying it now, but have some problems. I'll try around and see if I can find the problems. You can see it here: http://mfnnytt.modellflynytt.no

    Something I can't see by the code is how I can select which articles ho shall be the top story. I look's like it onely show's the latest one's? I wanted to use the "Feature" article option, and have the latest of them listed in pos. 1, 2 and 3.


    Any tips?


    (This post was edited by klausre on Nov 22, 2006, 11:09 AM)


    Damon
    Staff / Moderator


    Nov 22, 2006, 11:41 AM

    Post #19 of 37 (6000 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi,

    In the tutorial for creating articles 4-7 and articles 8-10, I missed the step to select the correct template to use. Sorry about that.

    Open up the Publish Rules for each and set this:
    Template: articleLists/globalIndex_articlelist_includes.html

    Then save a publish your Global Index again.

    I will post again shortly with details about setting up "Feature" article option.

    Cheers
    Damon Edis
    interactivetools.com

    (This post was edited by Damon on Nov 22, 2006, 11:42 AM)


    klausre
    User

    Nov 24, 2006, 1:33 AM

    Post #20 of 37 (5938 views)
    Shortcut
    Re: [Damon] Top Story [In reply to] Can't Post

    Hi D. In the period of waiting for you're new cool costume tweak D, I'm trying to learn the way AM2 works and all the special AM2 tags and so on. And can you in the forlowing code:

    Code
    <!-- templateIf : $articleList.currentResultNumber$ == "1" --> 
    <table border="0" cellspacing=0 cellpadding="6">
    <tr>
    <td colspan="2">

    <!-- templateIf : $article.summaryImage$ ne "" -->
    <span>
    <a href="$published.articlePage.url$">
    <img src="$article.summaryImage:fileAttribute(1,thumbnailWebUrl)$ " border="1" alt="$article.summaryImage:fileAttribute(1,title)$"
    width="$article.summaryImage:fileAttribute(1,width)$" height="$article.summaryImage:fileAttribute(1,height)$" style="margin-right: 5px;"></a>
    <br>
    <span class="summary_date" style="width:$article.summaryImage:fileAttribute(1,width)$px; line-height: 95%;">$article.summaryImage:fileAttribute(1,caption)$</span>
    </span> <br clear="all">
    <!-- /templateIf -->

    <a href="$published.articlePage.url$" class="summary_title">$article.title$</a> -
    <span class="summary_date">$article.date$</span><br>
    <span class="summary_breadcrumb"><!--#include virtual="$published.categoryBreadcrumb.webpath$" --></span><br>
    <span class="general_text">$article.summary:textOnly$... </span><span class="summary_date">[&nbsp;<a href="$published.articlePage.url$">Read&nbsp;More</a>&nbsp;]</span>
    <br clear="all"><br>
    $my.globalAdOne$
    </td>
    <tr >
    <!-- /templateIf -->

    help me whit this (it's separate questions and I like to have a specific answer for each):

    1. I have made a second upload field named "summaryImage2" ho I what to display, not the tumb version but the hole image. Any hint on how to do this?

    I've made a templatecell like this (for the use of article 1, 2 and 3):
    <!-- templatecell : article.summaryImage2.row -->
    <span style="float:left">
    <a href="$published.articlePage.url$">
    <img src="$file.thumbnailWebUrl$" border="1" alt="$file.title:htmlEncoded$" width="230" height="80" style="margin-right: 5px;"></a><br>
    <!-- /templatecell : article.summaryImage2.row -->

    As you see this use the tumb for the templatecell, and I think it's there the problem is - as I want to use the raw image.


    (This post was edited by klausre on Nov 26, 2006, 12:57 PM)


    klausre
    User

    Nov 26, 2006, 11:44 AM

    Post #21 of 37 (5879 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi D.

    I found and error one the globalIndex_articlelist_includes.html template. On line 11 you use <a href="$article.url$" class="summary_title">$article.title$</a> for the article url link for the article title. It generate a dead link, and I think you need to use $published.articlePage.url$ instead of the $article.url$. It works for me then. Can you confirm that I made the correct link?


    And, do you know what I'm doing wrong in the post above?


    (This post was edited by klausre on Nov 26, 2006, 12:11 PM)


    klausre
    User

    Nov 27, 2006, 11:24 AM

    Post #22 of 37 (5853 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    ??

    So far: http://mfn.modellflynytt.no


    klausre
    User

    Nov 28, 2006, 10:30 AM

    Post #23 of 37 (5831 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Sorry if I nag you, but I realy want to get the bigg picture up?


    ChetW
    Staff


    Nov 28, 2006, 5:06 PM

    Post #24 of 37 (5814 views)
    Shortcut
    Re: [klausre] Top Story [In reply to] Can't Post

    Hi Klausre,

    Thanks for the post!

    I have taken a look at the summary image2 code thar you are using, it looks like the problem is that you are asking the summary image to use a fixed width and height (width="230" height="80"). What you may want to try is telling Article Manger to use the original uploaded image as the source (src) and to also use the original uploaded images' height and width attributes. :)

    To do this try using this bit of code:


    Code
      
    <!-- templatecell : article.summaryImage2.row -->
    <span style="float:left">
    <a href="$published.articlePage.url$">
    <img src="$file.webUrl$" border="1" alt="$file.title:htmlEncoded$" width="$file.width$" height="$file.height$" style="margin-right: 5px;"></a><br>
    <!-- /templatecell : article.summaryImage2.row -->



    Give this a try Klausre! I have also read through the first section of your post with the code that refers to:

    $articleList.currentResultNumber$

    I am not sure though at the moment if this is a sample of the code that you used to get things going, or if you are still having an issue and would like for us to look over this code. Is this something that you would like for us to look at? If so I will be happy to take a closer look at things for you. :)

    Does this help Klausre? I look forward to hearing back from you soon!
    Cheers,
    Chet Woodside - Product Specialist
    support@interactivetools.com


    Hire me!
    Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.



    klausre
    User

    Nov 29, 2006, 9:59 AM

    Post #25 of 37 (5804 views)
    Shortcut
    Re: [ChetW] Top Story [In reply to] Can't Post

    H C.

    I'm getting confused and frustrated here.. I have tryed you're code above.

    Take a look at my screen shot (higher up).
    First. My goal is to have the summaryimage2 at the top, for article 1 and the tumb. version of summaryimage2 for article 2 and 3. The reason I want to have fixed size is to make sure the tumb and full size image has the size my design require.

    So how to do this.

    Can I have the templacell like this:

    Code
     
    <!-- templatecell : article.summaryImage2.row -->
    <span style="float:left">
    <a href="$published.articlePage.url$">
    <img src="$file.thumbnailWebUrl$" border="1" alt="$file.title:htmlEncoded$" width="220" height="80" style="margin-right: 5px;"></a><br>
    <!-- /templatecell : article.summaryImage2.row -->


    and call article.summaryImage2 for the article 2 and 3. And at the same way cal the full aummaryImage2 for article 1 - HOW do I call the image direct, and way doesn't this code work:

    Code
    <!-- templateIf : $article.summaryImage2$ ne "" -->   
    <span>
    <a href="$published.articlePage.url$">
    <img src="$article.summaryImage2:fileAttribute(1,WebUrl)$ " border="1" alt="$article.summaryImage2:fileAttribute(1,title)$"
    width="$article.summaryImage2:fileAttribute(1,width)$" height="$article.summaryImage2:fileAttribute(1,height)$" style="margin-right: 5px;"></a>
    <br>
    <span class="summary_date" style="width:$article.summaryImage2:fileAttribute(1,width)$px; line-height: 95%;">$article.summaryImage2:fileAttribute(1,caption)$</span>
    </span> <br clear="all">
    <!-- /templateIf -->


    First page Previous page 1 2 Next page Last page  View All
     
     


    Search for (options)
    Products
    CMS Builder
    Article Manager
    Realty Manager
    Listings Manager
    Order Now
    Services
    Priority Consulting
    Support
    Online Documentation
    Support Forums
    Support Homepage
    Company Info
    12 reasons to choose us!
    Meet the team
    Monthly newsletter
    Contact Us
    Toll Free: 1-800-752-0455
    Phone: (604) 689-3347
    Sales | Support
    Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
    #201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4