1

I'm often working with Pages in RTL Languages where the default Theme and also the admin theme are using RTL languages.

What often bothers me, is to use LTR texts like Tokens or Paths in Textfields, because the specialchars like / or [ are shifted.

To solve this, i would like to add the dir=auto attribute to all Textfields in admin Theme.

So the textfields should look like this:

< input type="text" id="edit-file-public-path" name="file_public_path" value="sites/default/files" size="60" maxlength="255" class="form-text" dir="auto">

My idea was to create a Subtheme of Seven and use the template_preprocess_field function to add the dir attribute to all fields.

My issue is, that my Preprocess function is never called.

Are the preprocess functions called in admin Theme? And is there an another way to do this?

myseven.info file:

name = My Seven
description = Admin theme based on seven admin Theme
package = Core
version = 1.0
core = 7.x
base theme = seven
stylesheets[all][] = css/myseven.css
settings[shortcut_module_link] = 1
regions[content] = Content
regions[help] = Help
regions[page_top] = Page top
regions[page_bottom] = Page bottom
regions[sidebar_first] = First sidebar
regions_hidden[] = sidebar_first

template.php Function

function myseven_preprocess_field(&$variables, $hook){ 
    dsm($variables);
    watchdog("Hello World!","The preprocess_field Works!"); //if this function is ever called there should be an entry in Reports
    }

1 Answer 1

0

template_preprocess_field is for field output themeing not input field themeing, you maybe looking for theme_textfield or hook_field_widget_form_alter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.