i'm using an optional argument to filter a projects list by taxonomy terms with panels 3.

as panel title i defined "%category:name Projects", this works fine when the category is given. if not, unfortunately it outputs the replacement string.
mysite/projects/arts ... title = "Arts Projects", fine
mysite/projects ... title = "%category:name Projects", wrong - should be "Projects"

did i miss some configuration option? i atached my panels export

thanks, josef

CommentFileSizeAuthor
#2 patch.txt492 bytesayalon
panel.txt3.19 KBdasjo

Comments

ayalon’s picture

I have the same problem. Is there an easy solution for this?

If you have an optional parameter and if you are using substitution patterns, the pattern are not deleted if the argument is not present.

Example:

Panel Page URL:
infos/!tid

Title Pattern:
Infos %tid:name

If argument is present:
Infos MyCategoryname

If argument is missing:
Infos %tid:name

Better would be:
Infos or Infos All where "All" is the wildcardname of a view used on this panel page.

I tried with the wilcard "all" but this is not working too because "all" is not accepted as a valid context argument and therefore its not possible to pass the wildcard to a view.

ayalon’s picture

StatusFileSize
new492 bytes

I wrote a small patch for ctools to remove all patterns, that are not replaced if an optional argument is missing.

merlinofchaos’s picture

Status: Active » Needs review

Setting proper status for a patch.

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 6.x-3.0-beta2 » 6.x-1.x-dev
Component: User interface » Code

And proper project since the patch is against ctools.

merlinofchaos’s picture

Status: Needs review » Fixed

And committed!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.