
Dave
Staff
/ Moderator

Nov 17, 2011, 10:44 AM
Post #6 of 8
(794 views)
Shortcut
|
|
Re: [InHouse] WCAG 2.0 Compliance Suggestion
[In reply to]
|
Can't Post
|
|
Hi Jayme, There's an undocumented function in viewer-functions.php which we use for that purpose. It's called getFilenameFieldValue(). It's meant to be passed a $record and list of fields, but you can call it directly like this:
$string = 'Hello World! How are "you" doing today?'; $_link = getFilenameFieldValue(array('input' => $string), 'input'); $_link = "article-" .$_link. "123"; showme($string); // outputs: Hello World! How are "you" doing today? showme($_link); // outputs: article-Hello-World-How-are-you-doing-today-123 Would that do what you need? Or are we getting closer? :) If that works for you we could make a wrapper function for it so it's even easier to call, such as createCustomLink($prefix, $title, $recordNum); Dave Edis - Senior Developer interactivetools.com
|