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.


[Solved] Error message with templates

Login / Search

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

Fan in action

I'm trying to make a modification to BLOCK_MAIN_RECENT_CC_ENTRIES for my website to make it use a title instead of the default "Latest {Number} {Category}" but I keep getting this error

A parameter, TITLE, is referenced in the template, BLOCK_MAIN_RECENT_CC_ENTRIES, but not passed

The template code I'm using is

{+START,BOX,{TITLE},,{$?,{$GET,in_panel},panel,classic}}
{CONTENT}
{+END}

And i'm calling it using

Code

[block="5" catalogue="july2010npcs" zone="_SEARCH" title="A day in the life of an NPC"]main_recent_cc_entries[/block]
Any idea what I'm doing wrong?
Back to the top
 
Posted
Rating:
#60998
Avatar

Hi,

This block doesn't support titles.

However, you could change:

Code

{!RECENT,{NUMBER*},{CATALOGUE_TITLE*}}
to something like:

Code

{$?,{$EQ,{CATALOGUE_TITLE},NPC},A day in the life of an NPC,{!RECENT,{NUMBER*},{CATALOGUE_TITLE*}}}

Assuming your catalogue is entitled NPC.

All I did here was add a little logic to say "if the catalogue title is NPC output what you want otherwise output the standard 'recent …' title.


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:
#60999
Avatar

Fan in action

Is there a way I could go about building a block with the same functionality that would support titles?
Back to the top
 
Posted
Rating:
#61000
Avatar

With programming, but the above template solution should work well.


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:
#61001
Avatar

Fan in action

I'll investigate a programming solution then, I like my general solutions. Mostly because I can't guarantee this'll be the only case where I'll want to change the heading. Any suggestions on where to start?
Back to the top
 
Posted
Rating:
#61002
Avatar

sources/blocks/<blockname>.php


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:
#61003
Avatar

Fan in action

Thanks for the help :D got it all sorted out! Need to watch my typing ENTIRES != ENTRIES lol
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: