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.


News - Featuring catalogue content

Login / Search

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

Community saint

I'd like to be able to have news items from time to time that would be of a "Featured Entry" type with the content being pulled from catalogue entries. My first kick at the cat was to create a news article with a text introduction in the News Article field and the content in the News Summary. I used the random content block:

Code

[block param="catalogue_entry" efficient="1" id="35" filter="12" title="Random content" zone="_SEARCH"]main_content[/block]
however, when displayed, the news article field (in this case the introduction) is gone and the entire catalogue entry is displayed as opposed to the article field being displayed with the usual read more link which would then take me to the summary page and the catalogue content. (whew! can you say run on sentence?  ;) ) I tried the various catalogue blocks but I can only get as deep at the entry title being displayed and not the content. I've also tried embedding the above block in a forum post then calling the main_forum_news block, but that produced a rather wacky display.

Is there another way to tackle this?

"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:
#42542
Avatar

Hi,

I'm right that any reference to news and articles is unrelated to the news addon aren't I? I think it's just a coincidence you're using the same terminology but I wanted to check.

For the main_content block method…

Did you try adjusting which fields were set to have the "Display in search/feature-views" tick on?

I haven't tried this recently, but that option is supposed to limit what is shown on both search results, and renderings via the main_content block.


I don't think the specific catalogue blocks will help as those are for displaying sets of entries rather than any individual one. You're on the right path with main_content.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42558
Avatar

Community saint

Hi Chris! Yes, you are correct, I was using the wrong terminology. Basically, the support site I've gone live with is heavily driven by the knowledgebase catalogue. What I'd like to do is pull an entry from this catalogue from time to time to feature on the frontpage to bring more attention to it.

"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:
#42559
Avatar

Community saint

Update to above: again I wasn't clear enough, so hopefully this should do it. Taking what I've mentioned above the method I'd like to use to display this featured content is to use a news post (again, just for display methodology; the news article is acting as a container if you will for the pulled content). I would put in introduction in the news article field and a link in the summary field to the actual content. This way, I can highlight content without having to maintain it in more than one area of OCP. What's happening with this approach is when the news article is displayed on the front page, the introduction text is no where to be found and the linked in content is displayed fully as opposed to the introduction text being displayed with a "read more" link that when clicked shows the entire article just like a regular news post would behave.

Have I made things clear as mud? ;)

I thought I'd try two different angles using comcode and cedi, but same result.

"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:
#42566
Avatar

Hi,

I might be getting confused, but I've just tested what I said about "Display in search/feature-views" and it seems to work. With one caveat though: you need to empty the block cache else the main_awards block isn't refreshing (I'll fix this).

I tested it with your Comcode, on the default FAQs catalogue. I added an entry, then edited the catalogue so 'Answer' was not set to "Display in search/feature-views". The result was a block showing the question, but no answer; and an automated 'Go to' button.

If I'm confused about the issue it could help me if you post a screenshot of the block you see, the edit page for the entry the block is showing, your catalogue, and a mockup of what you'd like to see.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42575
Avatar

Community saint

OMG, humble apologies Chris for wasting your time.  :$

All this time I've been putting the entries in reverse order, that is the introduction text in the article field and the call to content in the summary field….

:@

"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:
#42576
Avatar

Don't worry :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42591
Avatar

Community saint

So close now, however, I'll need a little clarification on this one as I don't know if it's a bug or I'm pushing the functional limits. I've created a news entry with introductory text in the summary field and the following in the article field:

Code

[block param="catalogue_entry" id="35" filter="12" title="Feature" zone="_SEARCH"]main_content[/block]
The output is exactly as expected, however, when I click the "Read More" link, I'm taken to the site map and page cannot be found. Normal news posting (that is, with content in both fields, no blocks) works fine. The URL under the Read More link does not seem to be picking up the correct id information:

Code

site/index.php?page=news&type=view&id=10&filter=10
The id should be 9 (article) and the filter (10) is correct.

"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:
#42630
Avatar

Hi,

I think my mind's about to blow  :lol: .

It seems to work when I test it, but it's quite a complex setup so I probably haven't replicated it exactly. It's probably best if you can show me on your site.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42633
Avatar

Community saint

LOL, thanx for the assistance with this Chris, much appreciated! The culprit is on the support site and it's the "Spotlight" news article referring to REGEX processing post immediately below the what's new tabbed box.

"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:
#42679
Avatar

Hi,

It looks like it's a bug, and this replacement to sources/blocks/main_news.php should fix it:
Attachment
» Download: main_news.php (11 Kb, 252 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#42715
Avatar

Community saint

As usual Chris, you are the wizard. Thanx Mate, that fixed things up dandy.

"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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: