Problems, need help? Have a tip or advice? Post it here.
18 posts Page 2 of 2
That has sorted it.
Thank you for your time once again.
Next problem:
I now have the title showing, but I can't work out how to get all of the content of each cloned page to display.
This is the code for each of the testimonials:
Code: Select all
<cms:template title='testimonials' clonable='1' order='90'>
   <cms:editable name='who'
      label='who gave testimonial'
      type='text'
      />
   <cms:editable name='where'
      label='venue'
      type='text'
      />
   <cms:editable name='photographer'
      label='photographer'
      type='text'
      />
   <cms:editable name='blurb'
      label='blurb'
      type='text'
      />
   <cms:editable name='testimonial_image'
      label='testimonial image'
      type='image'
      />
</cms:template>
<!DOCTYPE html>
<body>

      <h1 class="comments commentsphonadj"><cms:editable name='who'>Craig and Laura – June 2013</cms:editable></h1>
      <div class="w-row commentscontainer notoppad">
        <div class="w-col w-col-6">
          <h3 class="commentsub commentsphnadj"><cms:editable name='where'><a class="inline-link"<cms:show venue_text /></a></cms:editable></h3>
          <h3 class="commentsub commentsphnadj"><cms:editable name='photographer'>Photography by David Bailey</cms:editable></h3>
          <p class="commentspara commentsphnadj"><cms:editable name='blurb'>Despite reading every wedding blog, book and magazine possible, I never imagined that stationery could be so elegant, beautiful and compliment a wedding as much as Laura’s stationery did for our wedding. We met with Laura 18 months before our
            wedding. I knew that I wanted the same person to do all our stationery so that there would be a theme running through the “save the dates” and all the “on the day” stationery. Laura was amazing – I am the least artistic person imaginable but
            Laura really understood what we wanted to achieve with our wedding stationery. It had to set the tone for our wedding – when our family and friends received our wedding invitation I wanted them to know that we were having a beautiful, country
            wedding. We held our reception at Nonsuch Mansion on 26 April 2014 and every commented on how beautiful our stationery was – we colour coordinated our flowers, bridesmaids dresses and venue decorations. Laura’s designs and creations complemented
            everything perfectly. Her attention to detail is perfect – we even had little diamantes on our menus and order of services. Even though I was sometimes a bit of a bridezilla, Laura was amazing at talking through my ideas and really delivering.
            In fact, she exceeded our expectations.</cms:editable></p>
        </div>
        <div class="w-col w-col-6">
          <img class="offset-keyline testimonial-image" src="<cms:show testimonial_image />" alt="<cms:show testimonial_image_alt />">
        </div>
      </div>
</body>

Do I need to create <cms:show custom_field='who'> etc? If so do I put that in the snippet file or on the page. I have tried all sorts of scenarios and nothing seems to work.


More help please…
Thank you.
All the variables will be available within the cms:pages block you have e.g.
Code: Select all
<cms:show_repeatable 'lauras_testimonials_list' >
    <cms:if testimonials != '-' >
        <cms:pages masterpage='testimonials.php' id='testimonials' >
            <h3><cms:show k_page_title /></h3>


            .. at this point all the regions defined in testimonials.php are available..
            e.g.
            <cms:show who />
            <cms:show where />
            <cms:show photographer />


        </cms:pages>
    </cms:if>
</cms:show_repeatable>
I must have tried every option other than the real one!

Thanks again, all sorted and working now.

Couch is fantastic :P
Hi,

I have a problem which is very similar (i think) to my opening point but I've fallen at the final hurdle. Please can you help?

On my page, I have 3 boxes which are featured links and will link to pages within the site:

Code: Select all

- box 1 (link 1)
- box 2 (link 2)
- box 3 (link 3)



In the template, I've set these up as a repeatable which has 3 options (title, text and link) with link being the dropdown, like this

Code: Select all

<cms:repeatable name="home_link" label="Link" group="home_links_group">
   <cms:editable type="text" name="home_link_title" label="Title" />
   <cms:editable type="text" name="home_link_text" label="Text" />
   <cms:editable type="dropdown" name="home_link_url" label="Link to" opt_values="my-links.html" dynamic="opt_values" />
</cms:repeatable>



In the dropdown, I want to display a list of links on the site. I've setup the page 'my-links.html' in the snippets folder and the code for this is:

Code: Select all

Please Select=-

<cms:pages masterpage='about-us.php' orderby='publish_date' order='desc' limit='1'>
   | <cms:show k_template_title  />=<cms:show k_template_link  />
</cms:pages>
<cms:pages masterpage='about-us.php' orderby='publish_date' order='desc' offset='1'>
   | <cms:show k_page_title  />=<cms:show k_page_link  />
</cms:pages>

<cms:pages masterpage='standards.php' orderby='publish_date' order='desc' limit='1'>
   | <cms:show k_template_title  />=<cms:show k_template_link  />
</cms:pages>
<cms:pages masterpage='standards.php' orderby='publish_date' order='desc' offset='1'>
   | <cms:show k_page_title  />=<cms:show k_page_link  />
</cms:pages>



The site is made up of a number of 'sections' which I've done as clonable pages. The first page of each section is the top level page and all of the others are sub pages. When I link to the pages in the navigation, I link the first page to the template link and the sub pages to the page_link. So there will be 2 cms:pages loops for each section as per above.

Now when I come to the CMS, the pages read out fine in the dropdown. Since I was replicating from the previous example, I had the 'k_template_link' and 'k_page_link' as 'k_template_id' and 'k_page_id' and these read out into the front end where I have the code:

Code: Select all

<cms:show_repeatable 'home_link' >

   <a class="panel" href="<cms:show home_link_url />">
      <h2 class="panel__title"><cms:show home_link_title /></h2>
      <div class="panel__text">
         <p><cms:show home_link_text /></p>
      </div>
   </a>

</cms:show_repeatable>



When I changed 'k_template_id' and 'k_page_id' to 'k_template_link' and 'k_page_link', nothing reads out into the front end and when I go back to the CMS, the dropdowns are reset to the default 'Please select'. When I look at the HTML for the dropdown in the CMS, all of the values for each option are present and correct. It's just for some reason they lose their value.

So is there a reason why you can pass the ID though here but not the link?

Thanks
Daz
Hi KK,

Just checking if you had seen my addition to this thread and whether it's possible?

Thanks
Daz
HI,
I use this method with editable Region check box:
<cms:editable
name="simple" opt_values='remote.html' dynamic='opt_values' type='checkbox' />

remote.html:
<cms:pages masterpage='page.php' skip_custom_fields='1'>
| | <cms:show k_page_title />
</cms:pages>

<cms:folders >
<cms:show_repeatable 'filter' >
<cms:input type="checkbox" opt_values="<cms:show simple />" /> <br />
</cms:show_repeatable>
</cms:folders>

Everything worked well but there is one problem - all checkboxes are displayed on one line.
The question is how to show them one below the other?

Thanks
@orbital, I can see what the problem is -
suppose the region named 'simple' has two checkboxes selected (say 'a' and 'b'), using <cms:show simple /> anywhere would print out 'a | b'. So the following statement you used -
Code: Select all
<cms:input type="checkbox" opt_values="<cms:show simple />" />

would evaluate to -
Code: Select all
<cms:input type="checkbox" opt_values="a | b" />

As you can see, the single '|' being supplied to opt_values will make all checkboxes show up in a single line.

To make them show up on separate line, the opt_values should have been 'a || b' (i.e. double pipes).

To do that, I think you'll have to use a bit of PHP with the 'simple' variable to replace the single pipe character with double.
18 posts Page 2 of 2