Ad Space
Ad Space

Hosting Geared For
your CMSMS needs

CMSMS ready Hosting

Hosting Starting at $15

  • • Hosted Mail
  • • Personal Control Panel
  • • CMSMS 1.8.1 tested
  • • Lightly packed servers
  • • Intrusion Detection
  • • URL monitored
  • • Custom solutions available

Order your hosting Now

CP Blogs

Wildcard Params... Example: Simple multiple CGCalendars

Posted by: Jeremy Bass
on Jul 1, 2009

Category:

CMS Made Simple, Smarty, Advanced, Coding

Summary: this is a simple trick using the MySQL wildcard... There are a few places you can do this trick but here is a working example...

Ad Space

Hello this is a simple trick using the MySQL wildcard... There are a few places you can do this trick but here is a working way to do it... So let us say that you wish to have a few calendars on the same page.. not a problem just do what the help states and you should end up with tags like...

{cms_module module="CGCalendar" action="default" display="calendar" category="CHERC" inline=1}

{cms_module module="CGCalendar" action="default" display="calendar" category="FB" inline=1}


Now... I what to have more categories and have them spilt out between the calendars... In my case I had 35 cats in 3 calendars.. so I used a strict naming system..

category ex:

CHERC
CHERC-AHA
FB
FB-Birth

This way all I had to do was make the tags like this...

{cms_module module="CGCalendar" action="default" display="calendar" category="CHERC%" inline=1}

{cms_module module="CGCalendar" action="default" display="calendar" category="FB%" inline=1}


Now where category="CHERC%" I get only CHERC and CHERC-AHA... so the same for the FB category... simple trick and yes you can user this wildcard trick in other places, thou I'm not going to list them out yet... also you can try this...
%CHERC% to pull it from the middle in some places.

Hope this helps…

Proof and more examples


Cheers
jeremyBass
Ad Space

Get Social With It

[+]

Add A Comment

[+]

Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):
 
Previous page: Hosting FAQ Next page: Experimental