Jem
Jem

Reputation: 769

What does "property=''" do?

I'm working on a Drupal site/theme. The CSS and PHP modifications are fairly easy; they just take a little time to learn and get working exactly how I want.
However, I'm having issues applying CSS styles to some elements because of what I think is a property function.

The code looks like <h2 property="dc:title" datatype="" class="node-title">.

What is a property function and what does it do or control within the page? Also how can I modify or remove it?

Upvotes: 1

Views: 1904

Answers (3)

Erika123
Erika123

Reputation: 11

in your css file, put:

h2[property="dc:title"]{color:#FFFFFF;}

or if it is a link, you may need:

h2[property="dc:title"] a {color:#FFFFFF;}

Upvotes: 1

avpaderno
avpaderno

Reputation: 29679

It's not a property function; it's an attribute that is used from RDFa, and that is added from the RDF module.

The easier way to remove those attributes is to disable the module, but I would not suggest doing it, as the purpose of that module is to enrich your content with metadata to let other applications better understand its relationships and attributes.

Alternatively, if the problem is just with that property, used for the nodes, then you can implement code similar to the following one:

function mymodule_preprocess_node(&$variables) { 
  if (isset($variables['title_attributes_array'])) {
    $variables['title_attributes_array']['property'] = NULL;
  }
}

The module should be executed after the RDF module, to allow its hook to be executed after the one implemented by the RDF module.

I have not seen any compatibility problem between the attributes added by the RDF module and the JavaScript code executed by Drupal core or third-party modules. It would probably be the case to investigate why you are having problems with the JavaScript code when those HTML attributes are added.

Upvotes: 3

Mridul Kashatria
Mridul Kashatria

Reputation: 4187

From wikipedia, check out RDFa

RDFa (or Resource Description Framework – in – attributes) is a W3C Recommendation that adds a set of attribute-level extensions to XHTML for embedding rich metadata within Web documents.

It is basically a way to add more metadata to XHTML docs for better semantics.

Upvotes: 0

Related Questions