Set up an .htaccess file to publish from a page asset

Megg's Avatar

Megg

30 May, 2015 04:03 PM

I'm trying to set up a page, named ".htacces" (note one 's') with a configuration set that has a file extension set as 's" to publish the .htaccess file.

We want to have a data definition and content type set up so one set of values goes to a staging server (a subsite) and another set goes to the live site (longer, different values needed.) I have it all set up, but when I have a template with just the default region, we end up with the content wrapped in <system-region name="DEFAULT"></system-region> tags. I want to know what the current best work-around is for that. What I found when search may be out of date and we want to set up a site to copy 30x so I don't want to have to redo each set-up.

We'll be using a Velocity script to parse the content.

Thanks for your help! Much appreciated.

  1. 1 Posted by Ryan Griffith on 01 Jun, 2015 05:27 PM

    Ryan Griffith's Avatar

    Hi Megg,

    I suspect the extra tag is due to the resulting content not being valid XML, so the XML validation routine is wrapping your content with an element tag.

    I would suggest setting up your Template as follows:

    <!--#cascade-skip--><pass-through><system-region name="DEFAULT"/></pass-through>
    

    And your Format would wrap all of the generated content with #protect-top code section tags.

    To summarize, this will tell Cascade to move the Format's content to the top of the rendered page's content and will remove the remaining <pass-through> tags because of the #cascade-skip code section.

    Please let me know if you have any questions.

    Thanks!

  2. Tim closed this discussion on 17 Jun, 2015 02:33 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