Mask included contents in design panel

I have an include file that contains a few functions that produce the necessary code for an html email. Since it makes tweaking the layout so much easier the include file contains mainly html code, e.g. (much simplified):
Include file:
<?php
function htmlmail($salutation)
ob_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html"; charset="iso-8859-1"></head>
<body>
     <p>Dear <?php echo htmlentities($salutation); ?></p>
</body>
</html>
<?php return ob_get_clean();
?>
I don't want DW CS4 to show this code in the design panel of the main file, since it displays incorrectly (thinks it has got to the end of the document, when of course it hasn't really even started.
Can anyone think of a tidy solution?
Ed

Thanks David, I'm loving heredoc!
I did explain why I wanted html markup in the include (I am creating an html email body), and now that I am using heredoc it confuses DW just enough to be perfect (I could of course have used a PHP string, but it is visually a lot clearer to be able to see proper indentation on the screen, especially when debugging).
Ed

Similar Messages

  • Spry accordion widget - SSI (server side include) as content in the panel

    After having inserted the following command <!--# include file = "content2.asp" -> in the accordion Panel Content I get an error in Dreamweaver - every time I open the file. See the error in the attached picture.
    Once all files are uploaded to the server it works apparently without problems or script errors.
    Is there anyone who can help me to use SSI "server side include" as content in accordion panels?

    Thanks for your reply.
    The fault lay in the SSI file. This file contained these tag:
    </ html>
    And of course the tag </ html> generate an error if the tag is inserted in the content of the accordion panel via ssi file.

  • Spry Accordion menu - How do you make tabs without content and make panel height fit the content?

    I have an Accordion Menu on my site and I would like to put a tab at the top that links to my homepage when clicked, instead of sliding open to show a content panel. I don't have any extra info to put in the content panel, so it would look kind of redundant to have it there.
    Also, each panel has a different amount of content, but they all default to the same height to fit the largest content. I want them to fit to the content of each panel. The only thing I've read said to set the height of the content panel to 100% in the CSS, but it didn't change anything.
    Thanks!
    Andrea
    http://www.andreamutsch.com

    You make it look so simple but it doesn't seem to be working for me...
    My first thought with getting rid of the tab content was to simply delete it, but when I do that I get a warning that 'The structure of the accordian appears to be damaged'. Then when I preview none of the tabs will open.
    This is what my accordian structure looks like with the tab content code deleted...
    <div id="Accordion1" tabindex="0">
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">home</div>
            </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">graphic design</div>
            <div class="AccordionPanelContent">
              <p align="center">identity </p>
              <p align="center">print </p>
              <p align="center">packaging</p>
              <p align="center">web </p>
            </div>
          </div>
    <div class="AccordionPanel">
            <div class="AccordionPanelTab">photography</div>
            <div class="AccordionPanelContent">
              <p>traditional</p>
              <p>digital</p>
              <p>retouch</p>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">contact</div>
            <div class="AccordionPanelContent">
              <p>email me</p>
              <p>design quote</p>
              <p>purchase photography</p>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">resume</div>
            <div class="AccordionPanelContent">download resume (.pdf)</div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">design blog</div>
            <div class="AccordionPanelContent">2009</div>
          </div>
    Also, getting rid of the height in the CSS had no effect (I did this before I did the above)
    Below is my current CSS for the Panel Content
    .AccordionPanelContent {
        overflow: auto;
        margin: 0px;
        padding: 0px;
        font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
        font-size: large;
        background-color: #633408;
        font-weight: normal;
        word-spacing: normal;
        text-align: center;
    Also there is a note in the CSS that says this...
    * Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel
    * Content container.
    I'm not sure how accurate that is since I don't have a height in there and it worked (although not how I wanted) but I just thought I would throw it in.

  • Design Panel is acting sketchy

    I installed stand-alone Dreamweaver CC (Mac OS x 10.9.3) and the Design Panel acting squirrely. the + keeps disappearing in the panel the interface comes and goes.

    Yes "CSS Designer Panel" It's happening on one of our workstations. The panel is their but the whole panel content or interface goes blank or if I start randomly clicking where something should be like the + appears only when I click. I tried uninstalling removing preferences settings folders etc. I did try creating a new User login and it works fine. I even completely erased the user from the Mac Pro, and created a new one. So it's not Dreamveaver.
    Thanks

  • How do I Include content (another page) in a WEeb [page

    I need some help. I’ve been using MS Front Page for the
    last 6-7 yrs. In MS FP there is a way to include an html file into
    another html file. Example: I have a Web site that has 10 pages.
    Each page is made up of a 3 column table with a menu file in the
    left hand column of the table. I want the menu to be present in all
    10 pages. In MS FP you can add that menu (html file) in the table
    and in all 10 pages. It is called Include, content, page. (Page
    being the menu file) When you make changes to the menu file it is
    changed though out all 10 pages. It’s is a dynamic content.
    My question is how is this done in Dreamweaver?

    Search DW's F1 Help for "server-side include".
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "FoxWolf" <[email protected]> wrote in
    message
    news:echrtf$6ie$[email protected]..
    >I need some help. I?ve been using MS Front Page for the
    last 6-7 yrs. In
    >MS
    > FP there is a way to include an html file into another
    html file.
    > Example: I
    > have a Web site that has 10 pages. Each page is made up
    of a 3 column
    > table
    > with a menu file in the left hand column of the table. I
    want the menu to
    > be
    > present in all 10 pages. In MS FP you can add that menu
    (html file) in
    > the
    > table and in all 10 pages. It is called Include,
    content, page. (Page
    > being
    > the menu file) When you make changes to the menu file it
    is changed
    > though out
    > all 10 pages. It?s is a dynamic content. My question is
    how is this
    > done in
    > Dreamweaver?
    >

  • .gif Picture not appearing in design panel

    I have a .gif picture not appearing in design panel but it
    appears in the browser preview.
    <div id="footerPanvalid">
    <image src="images/valid-xhtml10-blue.gif" alt="Valid
    XHTML 1.0 Strict" height="31" width="88" />
    </div>
    #footerPanvalid {
    position: relative;
    right: 200px;
    padding-left: 300px;
    z-index: 23;
    valid-xhtml10-blue.gif also appears in the assets panel
    Any ideas whats going on?

    Put a border around #footerPanvalid to make sure that you can
    see it in
    Design view.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "nikos_golf" <[email protected]> wrote in
    message
    news:fclmk4$39d$[email protected]..
    >I have a .gif picture not appearing in design panel but
    it appears in the
    > browser preview.
    >
    > <div id="footerPanvalid">
    > <image src="images/valid-xhtml10-blue.gif" alt="Valid
    XHTML 1.0
    > Strict" height="31" width="88" />
    > </div>
    >
    > #footerPanvalid {
    > position: relative;
    > right: 200px;
    > padding-left: 300px;
    > z-index: 23;
    > }
    >
    > valid-xhtml10-blue.gif also appears in the assets panel
    >
    > Any ideas whats going on?
    >

  • How to hide content in design view within Dreamweaver?

    How can I hide content in design view within Dreamweaver?
    I have a tabbed content menu that uses some javascript. Everything looks great in Live view, but when I go to design view, all the content goes way beyond the div. How can I make it to where I can hide the content in that div in design view or wrap it completely inside of there? It's really hard to explain which is why I provided some pictures!
    LIVE VIEW
    DESIGN VIEW
    Thank you in advance for all the help!
    Dalton

    Humm....... you want to hide it in Design View whilst working on the rest of the site?
    If that is the case set the menu container <div> to display: none; -
    <div id="menu" style="display: none;">This is the content menu</div>
    Then either set it to display: block; when you're ready to view it live or remove the style completely.

  • URGENT ! Help to printing contents of a panel (Plz Help me)

    hi guys,
    i developed a application which consists of lot of information on a panel, i am using print utilities and printing the panel but its printing only the visible part of the panel and its printing a single page. is there any way i can print the whole contents of the panel
    i really appreciate if anyone can help me out.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.print.*;
    public class PrintUtilities implements Printable
    private Component componentToBePrinted;
    public static void printComponent(Component c)
    new PrintUtilities(c).print();
    public PrintUtilities(Component componentToBePrinted)
    this.componentToBePrinted = componentToBePrinted;
    public void print() {
    PrinterJob printJob = PrinterJob.getPrinterJob();
    printJob.setPrintable(this);
    if (printJob.printDialog())
    try
    printJob.print();
    } catch(PrinterException pe) {
    System.out.println("Error printing: " + pe);
    public int print(Graphics g, PageFormat pageFormat, int pageIndex)
    if (pageIndex > 0)
    return(NO_SUCH_PAGE);
    else
    Graphics2D g2d = (Graphics2D)g;
    g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    disableDoubleBuffering(componentToBePrinted);
    componentToBePrinted.paint(g2d);
    enableDoubleBuffering(componentToBePrinted);
    return(PAGE_EXISTS);
    /** The speed and quality of printing suffers dramatically if
    * any of the containers have double buffering turned on.
    * So this turns if off globally.
    * @see enableDoubleBuffering
    public static void disableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(false);
    /** Re-enables double buffering globally. */
    public static void enableDoubleBuffering(Component c) {
    RepaintManager currentManager = RepaintManager.currentManager(c);
    currentManager.setDoubleBufferingEnabled(true);

    not exactly so...
    implementing Pageable means imlpementing methods that return the number of pages, PageFormat object, and Printable object for each page... look in the API for this interface. It's actually quite a lot of work to do, as you have to divide your panel programmatically on "good" - suitable for your purposes rectangles of the page size, then cretae printale object for each ... but that can be done.
    I'm not that familiar with java printing, perhaps there is a much easier way to do it. Anyway, when I had to print one component on several pages, that's what I did - so it works.

  • Creating SharePoint Custom List using a list using a Microsoft.SharePoint.Client.ClientContext object: Lists.Add method from existing Template does not Include Template Content (include content was checked for template)

    The code below works assuming you have a list template setup called "GenTasksTemplate".
    The problem is that even though the check box to include content was checked during the creation of the template, the task items in the new list do not get populated.  What am I missing?
    using System;
    using System.Linq;
    using Microsoft.SharePoint.Client;
    protected void createSPlist(object sender, EventArgs e)
    ClientContext context = new ClientContext("https://sharepointServer/sites/devcollection/");
    var web = context.Web;
    ListTemplateCollection ltc = context.Site.GetCustomListTemplates(context.Web);
    ListCollection siteListsColection = web.Lists;
    context.Load(ltc);
    context.ExecuteQuery();
    ListCreationInformation listCreationInfo = new ListCreationInformation
    Title = "New Task from Template",
    Description = "Tasks created from custom template"
    Microsoft.SharePoint.Client.ListTemplate listTemplate = ltc.First(listTemp => listTemp.Name == "GenTasksTemplate");
    listCreationInfo.TemplateFeatureId = listTemplate.FeatureId;
    listCreationInfo.TemplateType = listTemplate.ListTemplateTypeKind;
    listCreationInfo.DocumentTemplateType = listTemplate.ListTemplateTypeKind;
    //listCreationInfo.CustomSchemaXml =
    siteListsColection.Add(listCreationInfo);
    context.Load(siteListsColection);
    context.ExecuteQuery();
    http://www.net4geeks.com Who said I was a geek?

    Yes. I can create a list with the template using the UI.  I can also create list programmatically using the Microsoft.SharePoint library within a Windows Forms Application.  If I do create a provider-hosted app referencing Microsoft.SharePoint,
    it results in a 64bit / 32bit mismatch error.  I am running SharePoint 2013 on a 64 bit Windows 2012 Server.
    The problem is that with a provider-hosted SharePoint App, I am limited to only using the Microsoft.SharePoint.Client library which is very limited.
    http://www.net4geeks.com Who said I was a geek?

  • Path issue leaving me unable to add blog post content in design view

    Hi guys,
    I am unable to add blog post content in design view when a template is applied to my blog. BC support have told me they fixed the problem by making minor changes to the paths of the css and javascript files and then told me to post on here for the solution.
    When I call the files using <link rel="stylesheet" href="/css/custom.css" /> everything displays perfectly but in BC I can't add blog post content in design view. I can edit in html but this isn't ideal for clients to update the blog.
    If I change the paths to <link rel="stylesheet" href="css/custom.css" /> it fixes the problem and I can then edit blog content in design view but all blog pages that are in folders display incorrectly. Only the main blog page display properly.
    I'm sure the answer is simple but I can't find it so any help would be greatly appreciated. Thanks
    Pete

    I took a look at your page URL and can't find any CSS issues or styles that would directly affect you editing/adding content to a blog post via the content editor.
    Make sure you either clear your cache or try in another browser to see if the problem is localized to your current browser.
    If you still have the problem can you link me to a screencast (you can use Jing if you don't have a screencast program: http://www.techsmith.com/jing.html) of what you are experiencing?

  • "You have included content in your post that is not permitted" when trying to post very positive feedback about Apple.

    So I spent 2 hours writing a huge post about how I love what Apple has done with the Audio/MIDI/Sound config tools in OSX. 
    I spent alot of time trying to be positive.  And i get to the end and click "Post" - this stops me and gives me the following vague message:
    "You have included content in your post that is not permitted."
    I am not sure what this means or why it appeared.  I used no negative content in my post, no cursing or trolling or anything... And i wouldn't try to troll or flame on these forums anyways.  I've posted some problems I've had, which were all addressed very quickly by the way.  And I've always said what I thought, but never just posted things to be negative.
    And then after my post is rejected, i tried again.  The discussion forums offered to restore my previous draft, but I clicked yes and nothing happened.  Then the entire Discussions site pretty much stopped functioning... I tried closing reopening Chrome.  I tried a completely new session in Chrome Incognito.  I tried using Safari.  None worked. 
    I was then offered a survey to take.  I clicked "yes", and nothing happened.  Then I looked at the Javascript Link for the survey and used the Chrome console to send the javascript anyways.  And then it said the survey was behind my browser (it wasn't) and there was an "X" button to close the yellow notification at the top of the page.  Then restarted my computer and it's finally working, but my post is still being rejected, which is ridiculous.
    Anyways, went through alot to say something positive.  That is the exact thing that gets to me though, it's the censorship.  Why am I not allowed to say something good?  Hopefully this one goes through...

    I don't believe I'm circumventing any DRM/Copyright.  I'm currently enrolled in a Harvard eDx Copyright Law class. As long as you are original and offer a minimum of creativity, you are eligable for a copyright, without any need for registration.  But that's besides the point.  I can see how it may have flagged the post though.
    Ultimately, what I was trying to do at the time is play music using software that I own and stream this in online video.  But the comment about streaming my personal music online is just an example of something awesome I can do with an Apple product.
    Thanks for the link to the feedback page though.  I'll go ahead and send it in.

  • How do I view content in Design view once everything is grayed out?

    I was building a web site.   When I switched from horizontal view to vertical view I was no longer able to view content in design view. The entire page was grayed out.  I'm also not able to view content in design view in other web sites too. How do I fix it?

    Well, yes the rest of the phone works, but the sole reason I got it was to able to view these files.  I had a Blackberry and I wanted a bigger screen.  Work allowed me to choose the iPhone or the latest Galaxy phone.  I chose the iPhone because I was told "it just works". 
    I know the Galaxy reads the .txt files because coworkers have it.  If the iPhone wont allow me to read the file then it doesn't matter if "it just works" because it can't do what I need it to do.

  • Error when using ANY "save site as template Include Content" solution to create a NEW Site Collection

    Here is the scenario. (SharePoint 2013)
    In Dev/Test/Prod any Site that we Save as Template and include content and then, Download and try to use in a new Site Collection errors out upon use "List does not exist" error.
    This occurs with ANY Site, even OOB Team Site template that is immediately "Saved as Template".
    We can do this in any other environment (we have several test labs 1 in O365 and 1 in VM that is very OOB)
    We can take the site solution from the environments we're having the issue in and use them successfully in our Lab environments (on prem or in the cloud).
    We have also tried taking Site solution from lab environment (where we know it works fine) and tried to use these in Dev/Test/Prod and they also error on us.
    In the Dev/Test/Prod environments that have the issue if we DO NOT include content, the template works just fine to create a new site collection with the template.
    Keep in mind we're talking about environment with no 3rd party apps, no custom code, just 2013 SharePoint with all patches and CU up to June 2013, AND this is ANY template even a vanilla OOB template without anything in it.
    You can always save site as template including content, download/upload it to new site collection solutions gallery and activate it without any issue... it's only if you try to use these templates to create a site that the error occurs.
    Any thoughts on this?
    J

    I also experiencing the same issue. I also tried to create a new site-collection using publishing site template, resulting in "list not found" error.
    Later I tried just a team-site (with content) -> the same error.
    The error appears on two different (post SP1) farms. That's why I tested the site-collection creation on an old (pre SP1) farm: the error doesn't exist. Site-Collections are created properly.
    My conclusion is: either SharePoint SP1 or a later CU causing the error.
    Regards,
    Valerian

  • Design panel not active with php file?

    I have DW CS5 on two computers.  One one the design panel is active with a PHP file. On the other, it is not active.
    I must have a setting wrong on the one computer. What do I need to do to make the design panel active?  The code panel is fine on both.
    It is very hard to work on a PHP file when I can't see the design panel.
    Regards,
    Bill Schaepe

    The problem is that I have a number of PHP files that I need to modify the words in a form and it is hard to see what I am doing.
    You can't do this in Code view?
    On both computers, I just generate a new PHP file.  On the one computer the design panel is active and I can click design tab on it to see the design.  On the other one, I  can't click on the design panel tab to see the design.
    Both the same version revision level of DW?  Both on the same platform?  Do you have an option to click on "Design" under View on the main menu?

  • Checking for Content in Collapsible Panel

    Is it possible, to programmatically, have Collpasible Panels
    open or closed , based on whether there is content in the panel or
    not? I have a scenario where we have emploeyed the collapsible
    panels, but have some panel sections that do not have content yet,
    and some that do. Eventually they will all have content, but not
    right now. My client still wants to retain those empty panels for
    future use, but only have the populated panels open when first
    entering the page.

    Hi Diana,
    I have a question about your second example above where "all
    panels when page loads are closed" You say that adding the
    following script should work:
    <script language="JavaScript" type="text/javascript">
    var cpg2 = new
    Spry.Widget.CollapsiblePanelGroup("CollapsiblePanelGroup2", {
    contentIsOpen: false });
    </script>
    Since I am using the Spry.widget.Accordian version. I
    modified the above script to read:
    <script language="JavaScript" type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
    contentIsOpen: false });
    </script>
    for the following elements markup inside of the html tags:
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Spry Accordion</title>
    <script language="JavaScript" type="text/javascript"
    src="javascript/SpryAccordion.js"></script>
    <link href="styles/SpryAccordion.css" rel="stylesheet"
    type="text/css" />
    </head>
    <body>
    <div class="Accordion" id="Accordion1" tabindex="0">
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 1</div>
    <div class="AccordionPanelContent">
    Content for Panel 1 goes here!<br />
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 2</div>
    <div class="AccordionPanelContent">
    Content for Panel 2 goes here!
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 3</div>
    <div class="AccordionPanelContent">
    Content for Panel 3 goes here!
    </div>
    </div>
    <div class="AccordionPanel">
    <div class="AccordionPanelTab">Panel 4</div>
    <div class="AccordionPanelContent">
    Content for Panel 4 goes here!
    </div>
    </div>
    </div>
    <script language="JavaScript" type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    <script language="JavaScript" type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
    contentIsOpen: false });
    </script>
    </body>
    The result I get is that the first panel still opens by
    default in a new or refreshed browser window. Any ideas how to
    change this so that no panels are open by default?
    Thanks,
    Robert

Maybe you are looking for