no block

lmwatson's Avatar

lmwatson

14 Sep, 2011 12:06 PM

I am trying to create a text block in Sites without adding text in the block, formally known as a no block to go with a format block.

I looked for an answer, but could not find it.

Every time I try to create this, Cascade insists that I add text.

  1. Do I need a "no block" in sites and can I just leave that area blank and add the format? OR

  2. How can I over ride the need for text in the block OR

  3. Would it matter if I put text in a "no block"?

  1. Support Staff 1 Posted by Tim on 14 Sep, 2011 12:43 PM

    Tim's Avatar

    Hi,

    I don't believe there is a need for these anymore. Are you getting an error when you assign a Format to a region to which there is no Block assigned? If so, can you attach your Format here?

    Thanks

  2. 2 Posted by lmwatson on 14 Sep, 2011 12:58 PM

    lmwatson's Avatar

    No it does not work. I am pulling in the CSS with a format and the CSS is not working

    I did make a no block and put a period in it, and it works but I would really like to make a text block without text.

    Here is the format:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output indent="yes" method="xml"/>

    <xsl:template match="/">
    <link href="/css/main.css" media="screen" rel="stylesheet" type="text/css"/>
    </xsl:template>

    </xsl:stylesheet>

    Thanks,
    Linda
    ---------------------------------------------------------
    Linda Watson, M.B.A., PCM
    Web Technology Manager, Webmaster
    Office of Strategic Marketing

    Rollins College
    1000 Holt Avenue - Box 2767
    Winter Park, FL 32789
    Office: 407.628.6391
    [email blocked]

    A ROLLINS EDUCATION. GREATER CONNECTIONS.

    ---------------------------------------------------------

    Please send requests to our team by emailing us at [email blocked] For 24/7 help, see our Web Strategy site at http://r-net.rollins.edu/webstrategy/.

    ---------------------------------------------------------

    ________________________________________
    From: Tim [[email blocked]]
    Sent: Wednesday, September 14, 2011 8:42 AM
    To: Linda Watson
    Subject: Re: no block [General]

  3. Support Staff 3 Posted by Tim on 14 Sep, 2011 01:03 PM

    Tim's Avatar

    If you are only using the Format to link to the CSS file, I would highly recommend putting this code in an XML Block instead. This will make it easier for people to modify in the future without worrying about messing up the Format (in case they aren't familiar with XSL). An XML Block with:

    <link href="/css/main.css" media="screen" rel="stylesheet" type="text/css"/>
    

    should do the trick. Then you can assign this Block to a region that exists within the <head> tags of your Template.

    Let me know if this makes sense.

  4. 4 Posted by lmwatson on 14 Sep, 2011 01:19 PM

    lmwatson's Avatar

    I would love to do that, but we use one template and different CSS's depending on the department and background.

    Thanks,
    Linda
    ---------------------------------------------------------
    Linda Watson, M.B.A., PCM
    Web Technology Manager, Webmaster
    Office of Strategic Marketing

    Rollins College
    1000 Holt Avenue - Box 2767
    Winter Park, FL 32789
    Office: 407.628.6391
    [email blocked]

    A ROLLINS EDUCATION. GREATER CONNECTIONS.

    ---------------------------------------------------------

    Please send requests to our team by emailing us at [email blocked] For 24/7 help, see our Web Strategy site at http://r-net.rollins.edu/webstrategy/.

    ---------------------------------------------------------

    ________________________________________
    From: Tim [[email blocked]]
    Sent: Wednesday, September 14, 2011 9:03 AM
    To: Linda Watson
    Subject: Re: no block [General]

  5. Support Staff 5 Posted by Tim on 14 Sep, 2011 02:05 PM

    Tim's Avatar

    I would love to do that, but we use one template and different CSS's depending on the department and background.

    Gotcha. I wasn't sure if this was the case or not because your XSLT Format doesn't contain any logic that would 'find' the department of the current Page and apply a particular CSS file.

    Anyhow, as your XSLT Format is now, there is no difference in creating an XML Block that contains that same information. After you all, you are just outputting a <link> tag to a CSS file. The Block can be attached at the Page level (perhaps on a Base Asset for an Asset Factory) to allow users to create Pages that adhere to the specific styles for the department.

    If you were going to dynamically assign a particular CSS file based on the folder structure (or department you were in), you would need to have some sort of logic in your Format which would then transform an Index Block.

    As a general rule, when using an XSLT Format, keep in mind that it must match on a particular element. Without any Block assigned to the same region there is nothing on which it can match. In cases like this, a Velocity Format would be useful as it does not need an element to match.

    Let me know if this makes sense.

  6. Tim closed this discussion on 12 Jan, 2012 08:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac