-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
[EMAIL PROTECTED] wrote:
| Hi, | |>Where and how do you call the Style element "div-titel"? Are you using |>MidCOM's style function? | | | No, I use it as a "normal" Midgard Style. It is called in the ROOT of | the main style:
That's the problem. Normal Midgard styles are attached to a page but MidCOM ties child styles to components (which govern topics, not pages).
So, you should be calling midcom_show_style("div-titel")
or something (I can't remember that one by heart ;)).Cheers!
~ //Henri
| ..
| <body <(bodytag-extra)>>
| <(div-titel)>
| <(div-menu)>
| <(div-content)>
| <(div-unten)>
| </body>
| </html>
| ..
|
| The structure of the style is as follows:
|
| SG :
| MyStyle
| +Sub1
| +Sub12
| <[div-titel]>
| <[show-article]>
| +Sub2
| ...
| <[show-article]>
| <[ROOT]>
| <[content-row]>
| <[css]>
| <[div-box]>
| <[div-content]>
| <[div-menu]>
| <[div-titel]>
| <[div-unten]>
| <[show-article]>
|
| Now I set the style of a topic to and what I expect is that it takes
| the element "div-titel" form Sub12. But it takes the element from
| /MyStyle. If I assign the same style (/MyStyle/Sub1/Sub12) to a
| non-MidCOM-page it works like expected.
|
| Maybe this is because the style /MyStyle is assigned to the root page
| of the MidCOM site and style assignments to topics in AIS are only
| resolved by MidCOMs style functions, as they are implemented as
| record_extensions and midgard does not know about them.
|
| But how to make little changes in the top of a page for different topics?
| I need some different images for different topics. OK, I could get the
| current topic in "div-titel" from the context and implement a case...,
| but this is not the way I like it.
|
| Hope I clearly described my problem now and you can give me a hint.
| /ingo
|
|
|>In order to make MidCOM display the right style (which is independent
|
|>from the Page Style because of some reasons), you have to use e.g.
|
|><? midcom_show_style("div-titel"); ?>
|>
|>Remember this is a function, so you have to make all variables you want
|>to pass to the Style Element global ones.
|>
|>
|>
|>>The following is the output of debug.log:
|>>
|>>Feb 24 10:41:38 [info] midcom_helper__styleloader::_getComponentStyle:
|>
|>Current
|>
|>>component has user defined style: 19
|>>Feb 24 10:41:38 [warn]
midcom_helper__styleloader::_get_style_id_from_path:
|>>Substyle '' not found
|>>Feb 24 10:41:38 [info] midcom_helper__styleloader::show: trying to
|>
|>load "style-
|>
|>>init"
|>>Feb 24 10:41:38 [info] midcom_helper__styleloader::show: trying to
|>
|>load "show-
|>
|>>article"
|>>Feb 24 10:41:38 [info] midcom_helper__styleloader::show: trying to
|>
|>load "style-
|>
|>>finish"
|>>Feb 24 10:41:38 [info] midcom_helper__styleloader::_getComponentStyle:
|>
|>Current
|>
|>>component has user defined style: 19
|>>Feb 24 10:41:38 [warn]
midcom_helper__styleloader::_get_style_id_from_path:
|>>Substyle '' not found
|>
|>See question above, there does not seem to be a load request for
|>"div-titel"...
|>
|> Nico.
|
|- -- Henri Kaukola [EMAIL PROTECTED] Consultant Tel: +358-20-198 6037 Nemein Oy http://www.nemein.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAP7Sf3xWc2AolrKgRAhmlAKCUICBTiCveLRBnBxgj/ikQgEY8tQCgh4Dy ejQOwfSGdl/dd2kG0Wv8KgM= =JIZ6 -----END PGP SIGNATURE-----
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
