Closed (won't fix)
Project:
File (Field) Paths
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2008 at 12:41 UTC
Updated:
13 Oct 2008 at 17:16 UTC
For example:
filename rule:
[field_b_author-title]--([field_b_serie_name-raw]--[field_b_serie_number-raw])--[title].[filefield_paths-ext]
filename result ([field_b_serie_name-raw] and [field_b_serie_number-raw] not empty):
Pol' Ighor'--(Anghiel-khranitiel'--2)--Anghiel-khranitiel' 320.rar
filename result ([field_b_serie_name-raw] and [field_b_serie_number-raw] empty):
Pol' Pol' Ighor'--(--)--Anghiel-khranitiel' 320.rar
But want Pol' Ighor'--Anghiel-khranitiel' 320.rar = need manually check for empty CCK field value
Comments
Comment #1
decipheredI understand what you are asking for and understand the use case, however I don't think it is something that should be directly coded into this particular module.
I would see this as either a feature for the Token module or a standalone module that only handles these conditional/programmatic token rules.
I'm marking this as won't fix, but if there is further work on this in another module I would be more than happy to integrate the functionality if needed.
Comment #2
ipto commentedPerhaps the easiest option would add action to replace in the resulting file name (after processing transliteration, token etc.), using the PHP function ereg_replace or str_replace, string $ pattern and the string $ replacement determine interface (ibid. where the rest of the rules of forming the file name).