Forum

Thread tagged as: Question, Problem

Multiple region perch_content_custom

Hi.

I'm not sure what's wrong with this:

on page:

perch_content_custom(array('Search options', 'Front page text'), array(
   'page'=>'*',
   'template'=>'common_search.html'
));

Then on output, common_search.html:

<perch:before>
<ul>
</perch:before>
   <li data="<perch:content id="from_options" type="text"/>"><perch:content id="from_text" type="text" /></li>
<perch:after>
</ul>
</perch:after>

The output for some reason is on two lines:

<ul>
<li data="From search options region"></li>
<li>From text region</li>
</ul>

Why does it split into two <li>, rather then:

<ul>
<li data="From search options region">From text region</li>
</ul>
Karri Karttunen

Karri Karttunen 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

This tag is not well formed

<perch:content id=from_options" type="text"/>

Hi, Drew.

This is just an example, I tried to simplify as much as possible. The real markup doesn't have this typo. I'm still not getting this to work. It always starts a new <li> elements.

If I print them straight as a text the id="from_text" has a space in front.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Can we see your actual code then, it's hard to help if we can't see the real code that isn't working.

Ok got it working a little differently.

I tried to get a list of pages with links and data-attributes for Javascript ajax sorting.

What I ended up using was modified navigation template. I added the properties as perch:pages attributes.

Only inconvinience is that necessary options are now in page details and not as template region. But that's ok. Perch_pages_navigation array didn't put the linebreak in the markup.