Derek Harmel wrote:
but be assured, after one or two months of utter confusion, things
is this just a static stylesheet, or do you want your editors to be able
to change it on a page-by-page basis?

Hmm, yes the content in the stylesheet would be static, but I want to
the stylesheet that is loaded to be dynamic and determined by a
pipeline.

Perhaps I didn't explain well enough.  My thought was to enable an
editor to add a stylesheet named "thispage.css" in any content
directory (not through lenya, through access to the filesystem) in
which they needed additional styling.

i see.

if it's static, no need to deal with pipelines, just reference it as
href="{$root}/css/yourstyle.css" and put it in
<pub>/resources/shared/css. if you want one stylesheet per page, you
could use "{$root}/css/{$document-id}.css", but this pretty much negates
the idea of content management, since you will want consistent design.

Not entirely, if the page-specific CSS is included before the global
stylesheet (page.css) this shouldn't be too much of a problem. Additionally, there is likely going to be only one person who will be
doing this, and they will have control of the global stylesheet as
well.  But the motivation for doing this is basically what you talked
about with image alignment.

Using "{$root}/css/{$document-id}.css" would work, but I personally
liked my idea of having the CSS file stored in the same place as the
content, it's a bit more concise.

understandable. my gut feeling is "it should be easy", but i don't know how it's done off-the-cuff... it usually helps me not to touch lenya for a day or two and re-read cocoon docs or solprovider's howtos.

I also figured this would be a good
execise in using xmaps, but I just don't follow them.  I really do not
understand what the CSS portion of the pipeline in
resources-shared.xmap does (why does the src attribute for map:act not
match the src attribute for map:generate directly below it?).

i think it does:

<map:match pattern="*/*/css/*.css">
<!-- Only called if a {3}.css exists because of resource-exists-enhanced before --> <map:act type="resource-exists" src="fallback://resources/shared/css/{3}.xml">
  <map:generate src="fallback://resources/shared/css/{../3}.xml"/>

iiuc this "{../3}" thing basically means "{3} in the context of the parent element", i.e. the same as as map:act src.


At some point, I need to figure out how to modify everything so that
my page.css is created dynamically through an XSLT so that I can
change my background-image: url( $url ) depending on my node.

this is already possible without changes to sitemaps if you name it page.xml. (it then uses other pipelines.) check the archive, i think it has been explained recently.

--
"Open source takes the bullshit out of software."
        - Charles Ferguson on TechnologyReview.com

--
Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Standort Duisburg
Mail: [EMAIL PROTECTED], Telefon: 0203/379-2736

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to