Problems, need help? Have a tip or advice? Post it here.
20 posts Page 2 of 2
thanks again for the assistance it didn't work at first, I pasted that snippet on the template the "intergated-marketing.php" however got same output front end page with no text and content displaying on it.

However then I reverted the title of the page from the backend and the content reappeared, now I got one very important question here, how can I change the title of the page and related content from the back end (which seem to me the very purpose of having a cms) without causing mayhem in front end?

I mean every time I change a title in the back end I'm going to lose the content on the front end page?
How can I prevent/avoid that?

As for the other matters, yes I did delete the commented parts when posting the page here.
However the url of the page is been posted in my first post therefore it seemed weird you asked me for it again.




KK wrote:
but sorry can't you see it yourself?? by navigating to the page?

don't get you honestly
Actually I did try doing that. The 'title' of cms:template in the code suggested that the code belonged to the 'integrated-marketing.php' but when I accessed that template the HTML output I saw did not match the code you had originally posted (which is explained by your second post - you had posted an 'edited' version of the template).

Also in case you missed seeing it, I requested you to get me the URL of the template so that I could see it myself -
As an alternative, just get me the URL to the template you posted and I'll take a look at it myself.

That said, I think you must understand one fact (and it seems that you have got it wrong) - none of us here on the forum are under any kind of obligation to go check and rectify mistakes in your coding. We do that in the spirit of trying to help others and you absolutely must appreciate that. I'm forced to remind you of this because the kind of tenor your posts carry suggest otherwise.

Coming to the problem at hand -
taking a look at the generated HTML and comparing it with the template code, I can see that the following block of code (it is used twice on the template) is coming out blank
Code: Select all
<cms:pages  masterpage='integrated-marketing.php' page_name='ideas-that-transform-brands'>
    ...
</cms:pages>

This suggests that either the name of the template is not right or the page named 'ideas-that-transform-brands' does not exist or is inaccessible. Since we can be sure that the name of the template is right, you'll have to check the page.

To debug this, place the following code anywhere in the template (just for testing) -
Code: Select all
<cms:pages masterpage='integrated-marketing.php' page_name='ideas-that-transform-brands'>
    <h1>Page found <cms:show k_page_name /></h1>
   
    <cms:no_results>
      <h1>Page not found!</h1>
   </cms:no_results>
</cms:pages>

If you get 'not found', try finding out the right page name and putting it there.

Hope this helps.
how can I change the title of the page and related content from the back end (which seem to me the very purpose of having a cms) without causing mayhem in front end?

I mean every time I change a title in the back end I'm going to lose the content on the front end page?
How can I prevent/avoid that?

While editing any page you'll see two textboxes on the top - one is the 'Title' and the other is 'name'. You can change the 'title' anytime you want. The 'name' however is a unique ID for the page and so if you refer to a page by its unique ID elsewhere in the code (as in your case) then, understandably, the code will break if the ID gets changed.

If, for some reason, you really need the ability to change the name often then use the numeric ID of the page in cms:pages instead (you can see the numeric ID in admin-panel in the page's URL) e.g.
<cms:pages masterpage='blog.php' id='14'>

This approach, however, is not portable. That is, if you happen to delete the page and then recreate it, it'll have a new ID and your code will break,

Take your pick.
ok, thank you that seems an exhaustive reply for the matter, so I understand that as long as I change ID in both backend and template I'll be fine with it, (this is due to my need of replacing samples/demo naming in the pages)
however we came across another possibly minor issue on this page http://www.designdiverso.com/about.php

some text content is "lifting" up from the previous positions you can see yourself the text should be in the center of respective black and white rectangles but is now lingering above those, just wondering this might be a related issue?
however I haven't changed title nor ID of the page.

What could be the problem in your opinion?



KK wrote:
how can I change the title of the page and related content from the back end (which seem to me the very purpose of having a cms) without causing mayhem in front end?

I mean every time I change a title in the back end I'm going to lose the content on the front end page?
How can I prevent/avoid that?

While editing any page you'll see two textboxes on the top - one is the 'Title' and the other is 'name'. You can change the 'title' anytime you want. The 'name' however is a unique ID for the page and so if you refer to a page by its unique ID elsewhere in the code (as in your case) then, understandably, the code will break if the ID gets changed.

If, for some reason, you really need the ability to change the name often then use the numeric ID of the page in cms:pages instead (you can see the numeric ID in admin-panel in the page's URL) e.g.
<cms:pages masterpage='blog.php' id='14'>

This approach, however, is not portable. That is, if you happen to delete the page and then recreate it, it'll have a new ID and your code will break,

Take your pick.
some text content is "lifting" up from the previous positions you can see yourself the text should be in the center of respective black and white rectangles but is now lingering above those, just wondering this might be a related issue?
This, as I said in an other post of yours, is a front-end issue. Couch merely outputs what you tell it to. So compare your static design's HTML with the generated HTML and you'll see what change is causing the problem. That will help you in debugging it.
I'm trying to debug here as suggested but honestly code look the same except for a class="intro" tag I tried taking it off and putting back up

result is the content is disappearing when taken off, and reappearing mispositioned though when back up, any tip on how to solve this?

This is the snippet from the template

Code: Select all
   <section data-target="intro" [color=#FF0000][color=#FF0000]class="intro"[/color][/color]>
       <article class="quote-hero black">
           <div class="content" >
               <div class="align">
                <cms:get "<cms:show my_lang />_about_content3 "/>
               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <cms:get "<cms:show my_lang />_about_content4 "/>
               </div>
           </div>
       </article>
   </section>



this is the html file

Code: Select all
<section data-target="intro">
       <article class="quote-hero black">
           <div class="content">
               <div class="align">
                   <p class="big">Nullam commodo rutrum tincidunt. Nunc id faucibus ex. </strong>.</p>
               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>
               </div>
           </div>
       </article>
   </section>
I'd suspect the content that is being added though the admin-panel -
<div class="align">
<p class="big">Nullam commodo rutrum tincidunt. Nunc id faucibus ex. </strong>.</p>
</div>

..

<div class="align">
<p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>
</div>

Perhaps the <p> elements have to do something with the problem?

Please compare this output with the static markup that you have. Does the original also have these <p>s? If not, you'll have to check the contents you have entered in the editable regions.

If the editable region you are using is type richtext or nicedit, they are bound to add the enclosing <p>s as they are wysiwyg editors. You might want to convert these regions into 'textarea' to have full control over what you enter.
I don't really get it, well the static markup is the one pasted above if you're referring to that?

and yes it does have the <p> or you meant to be rhetorical with your question?

If I take the <p class="big"> off the backend I'll no longer get the larger title in the front end, however I tried taking it off and does nothing but shrinking the text.

Although the issue is still there, when I take the "class="intro" away text disappears, but I can't figure out why, any suggestion?

Also don't get your last comment at all

If the editable region you are using is type richtext or nicedit, they are bound to add the enclosing <p>s as they are wysiwyg editors. You might want to convert these regions into 'textarea' to have full control over what you enter.


what do you mean by "converting these regions into text area"? how do I do that? from the front end?


KK wrote: I'd suspect the content that is being added though the admin-panel -
<div class="align">
<p class="big">Nullam commodo rutrum tincidunt. Nunc id faucibus ex. </strong>.</p>
</div>

..

<div class="align">
<p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>
</div>

Perhaps the <p> elements have to do something with the problem?

Please compare this output with the static markup that you have. Does the original also have these <p>s? If not, you'll have to check the contents you have entered in the editable regions.

If the editable region you are using is type richtext or nicedit, they are bound to add the enclosing <p>s as they are wysiwyg editors. You might want to convert these regions into 'textarea' to have full control over what you enter.
Ok, I'll try again ..

The code you pasted -
Code: Select all
<section data-target="intro">
       <article class="quote-hero black">
           <div class="content">
               <div class="align">
                   <p class="big">Nullam commodo rutrum tincidunt. Nunc id faucibus ex. </strong>.</p>
               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>
               </div>
           </div>
       </article>
   </section>

Is this from your static original design that is working fine or is it the problematic code generated by Couch using the other code you posted? I was assuming that it was generated code but perhaps I'm wrong and therefore my answer confused you.

I'd like to do a comparison between the static code that is working fine and the problematic generated code.

Could you please post both of them for me? (just the relevant part we have been discussing above). Use view-source to get the generated code.

Thanks.
ok,


yes I got confused thought you referring to the actual original html code.


so here is the generated code obtained with (source code view) in ff


Code: Select all
   <section class="about-intro">
       <article>
         
           <div class="content" data-fullscreen>
               <div class="align">
                   <h1 class="big"><h1 class="big">Ipsum dolor Nullam commodo rutrum.</h1>
</h1>
                   <p><p>Lorem ipsum dolor Nullam commodo rutrum,lorem ipsum dolor Nullam commodo rutrum.</p>
</p>
                   <a href="index.php" class="scroll-btn" data-goto="[data-target='intro']"><i class="fa fa-chevron-down fa-2x"></i></a>
               </div>
            
            
           </div>
         
       </article>
   </section>
   
   

   <section data-target="intro" class="intro">
       <article class="quote-hero black">
           <div class="content" >
               <div class="align">
                <p>Lorem ipsum dolor Nullam commodo rutrum <strong> suuruutensa. </strong></p>

               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>

               </div>
           </div>
       </article>
   </section>


   
   

   <section class="clearfix">
       <a href="careers.html" class="quote-hero white">
           <div class="content">
               <div class="align">
                <h2>Lorem ipsum dolors</h2>

<h2>join us at DD</h2>

               </div>
           </div>
       </a>
       <article class="img-hero ds"></article>
   </section>

   <section class="about-new-haven">
       <article>
           <div class="content">
               <h1><h1>Lorem ipsum dolor.</h1>
</h1>
               <p class="description"><p style="text-align: center;">Olemme tamperelainen, Suomi.Eloisaan kaupunkiin t&auml;ynn&auml; historiaa innovaatioon. Rakastamme sen energian, riippumaton henki, ja hullu-hyv&auml; musiikkiel&auml;m&auml;ss&auml;. Olemme ylpeit&auml; kutsua sit&auml; kotiin.</p>
</p><br><br><br><br><br><br><br><br><br><br><br>
              
           </div>
       </article>


and here is the actual code from the couch template page (about.php)

Code: Select all
<cms:pages masterpage='about.php' page_name='about-us'>
   <section class="about-intro">
       <article>
         
           <div class="content" data-fullscreen>
               <div class="align">
                   <h1 class="big"><cms:get "<cms:show my_lang />_about_content1 "/></h1>
                   <p><cms:get "<cms:show my_lang />_about_content2 "/></p>
                   <a href="index.php" class="scroll-btn" data-goto="[data-target='intro']"><i class="fa fa-chevron-down fa-2x"></i></a>
               </div>
            
            
           </div>
         
       </article>
   </section>
   
   

   <section data-target="intro" class="intro">
       <article class="quote-hero black">
           <div class="content" >
               <div class="align">
                <cms:get "<cms:show my_lang />_about_content3 "/>
               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <cms:get "<cms:show my_lang />_about_content4 "/>
               </div>
           </div>
       </article>
   </section>


   
   

   <section class="clearfix">
       <a href="careers.html" class="quote-hero white">
           <div class="content">
               <div class="align">
                <cms:get "<cms:show my_lang />_about_content5 "/>
               </div>
           </div>
       </a>
       <article class="img-hero ds"></article>
   </section>

   <section class="about-new-haven">
       <article>
           <div class="content">
               <h1><cms:get "<cms:show my_lang />_about_content6 "/></h1>
               <p class="description"><cms:get "<cms:show my_lang />_about_content7 "/></p><br><br><br><br><br><br><br><br><br><br><br>
              
           </div>
       </article>



KK wrote: Ok, I'll try again ..

The code you pasted -
Code: Select all
<section data-target="intro">
       <article class="quote-hero black">
           <div class="content">
               <div class="align">
                   <p class="big">Nullam commodo rutrum tincidunt. Nunc id faucibus ex. </strong>.</p>
               </div>
           </div>
       </article>
       <article class="paragraph-hero orange">
           <div class="content">
               <div class="align">
                   <p>Nullam commodo rutrum tincidunt. Nunc id faucibus ex. Phasellus quis maximus dolor. Nullam at tristique lorem, vel molestie eros. Nullam finibus odio metus. Nullam pretium eros id arcu dapibus, ultrices ornare neque vestibulum. Fusce ac efficitur leo.</p>
               </div>
           </div>
       </article>
   </section>

Is this from your static original design that is working fine or is it the problematic code generated by Couch using the other code you posted? I was assuming that it was generated code but perhaps I'm wrong and therefore my answer confused you.

I'd like to do a comparison between the static code that is working fine and the problematic generated code.

Could you please post both of them for me? (just the relevant part we have been discussing above). Use view-source to get the generated code.

Thanks.


hope this helps and you can put me on the right track and solve this.

Truly appreciated
Thanks.

The only difference I could notice is the absence of class="big" in the generated HTML <P>.
That still wouldn't explain the problem of why the text is not vertically centered.

You'll have to take a look at your CSS, I think.
From what I could see the DIV with class 'align' has the top-margin set to -125%
Code: Select all
.align {
  margin: -125% 0 0 0 !important;
}

I had to tweak it to -75% to make the text get centered.
So the issue seems to be CSS related.

Anyway, point is that the whatever text you inputted in the editable region is getting outputted correctly.
You'll have to use FireBug or Chrome dev console and compare the generated page with the static one to see which CSS rules are not matching in both.
20 posts Page 2 of 2