HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Is there a way to "pin" an news article?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63510 (In Topic #13742)
Avatar

Fan in action

When adding news articles, each new article appears at the top of the list on the front page.
Is there a way to pin a particular article so that it is always the first article in the news list?

Thanks.
Back to the top
 
Posted
Rating:
#63797
Avatar

Community saint

Hi columbo! Not that I can see and I tested with both the main news function and using the forums for news (with pinned topic). What exactly are you trying to accomplish with this? There may be another way to meet your goal.

Be well, SD

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#63799
Avatar

Fan in action

Hi SoccerDad,

Thank you for your response. One of the goals of my site is to make people more aware of the hobby of Amateur Radio, (HAM radio), and to encourage people to become HAMs themselves. Every time you add an article it appears at the top of the list on the front page. This is fine for most articles however, there is one article that explains how you can obtain your own Amateur Radio license and I would like this to always be the first article in the list. I'm not too concerned about the order of any of the other articles.

Thanks.
Back to the top
 
Posted
Rating:
#63801
Avatar

Community saint

Hi columbo!

I know of this method: By using Forum News display (main_forum_news) "Date Key"

You can either sort/display according to first or last post time. Value must be either 'firsttime' or 'lasttime'.

I imagine that if you choose to sort by "firsttime" the piece of news you insert as first time will be pinned down.

Another way would be to create two blocks: One to display your "Pinned Down" article exclusively (by making that section "read only" and the other to display the news in any other way.

Jean
Back to the top
 
Posted
Rating:
#63809
Avatar

Fan in action

Thanks Islander-aua.

Is this method using the forum area only? I do not have a "News" area in my forum. The articles that I am putting on the site are in the main portal area. Currently, I have this article at the top of the list on the home page but it is there only because I have not entered any new articles after it. If I do enter a new article it will no longer be at the top of the list.

You can see what I mean here.

Thanks
Back to the top
 
Posted
Rating:
#63811
Avatar

Community saint

There is a way, but you will need to create two separate 'News' blocks (boxes, containers, whatever).

I've done precisely that on my site. You'll need to impose 'filters' for each block.

I can provide the example code if that is the way you want to go. PT me or ask for it here; others may be interested.

 :cool:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#63812
Avatar

Community saint

columbo said

Thanks Islander-aua.

Is this method using the forum area only? I do not have a "News" area in my forum. The articles that I am putting on the site are in the main portal area. Currently, I have this article at the top of the list on the home page but it is there only because I have not entered any new articles after it. If I do enter a new article it will no longer be at the top of the list.

You can see what I mean here.

Thanks
Yes, I see what you mean. Selecting this News Block from any of the forum categories would definitely address your concern. You can easily create new forum categories and set them to "read only" for this purpose. However, I think that using the "firsttime" sort would work until the max number of post you've allowed would be reached and start to drop off with new entries. So the best bet is to set aside a unique block-give it a name-pin it down in the fashion described above and allow for just one entry at a time-this way when you need to update it with new facts, it would automatically be replaced. The other block would consist of news blog or forum as you have it now.

Jean
Back to the top
 
Posted
Rating:
#63836
Avatar

Community saint

All valid suggestions from Jean and Fletch. Myself, I like the path of least resistance so I would simply put an include tag on my start page (I like to keep "start" as clean as possible):

Code

[include]_news_test[/include]
The comcode page "_news_test" (name started with underscore to keep it from showing up in my sitemap; optional) would contain the information you would like pinned and the result is:

Hope this helps!
Be well, SD

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#63841
Avatar

Fan in action

Thanks to all, Jean, Fletch and SoccerDad.

I will first try "the path of least resistance" and if that does not work I'll try Fletch's suggestion.

I am not yet familiar with the comcodes so SoccerDad,… can you give me a sample of how it would be used in my case? (what goes between the tags).

Thanks
Back to the top
 
Posted
Rating:
#63843
Avatar

Community saint

  1. Just plop this on your start page whereever you'd like the pinned message to appear:

Code

[include]_news_test[/include]
2) Replace what's between the include tags with a page name of your choice.

3) Create the page and place whatever content you'd like in it. (make sure it's the same name as what you have between the include tags.) You can also wrap it in a box as well. (that is what I did for the example, however, the box I used is a custom one I built; click the box button in the page editor)

4) Done.

Hope this helps!
SD

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: