Jump to content

UL list problem


tuxy
 Share

Recommended Posts

Hello,

This is my first real project for a client, made with PW.

I have a (little) issue in the site.

In the screenshot below you can see in the footer menu, a little square (right).

post-3100-0-48923400-1425464728_thumb.pn

The menu is a inline UL and generated with this code:

<ul class="list-inline text-center extra">
  <?php
   $extra = $pages->get('/extra/'); 
   $children = $extra->children();

   foreach($children as $child) {
     echo "<li><a href='{$child->url}'>{$child->title}</a></li>";
   };
  ?>

</ul>

I tested adding links manually, and then the square is removed.

<ul class="list-inline text-center extra">
  <li><a href="#">menu 1</a>
  <li><a href="#">menu 2</a>
</ul>

How can I remove this square, when the menu is generated by PW?

For the moment the site is in development, but you can see the square on your mobile phone on:

jolisa.market-locator.com

Regards,

Christophe

Link to comment
Share on other sites

You have a unicode line separator (U+2028, E2 80 A8) between ?> and </ul>, but your main problem is using Android :P

If you switch your editor to ANSI, it will show up as 
. Obviously, that doesn’t belong there. Just remove it and you’re good :)

  • Like 1
Link to comment
Share on other sites

Hi Jan Romero,

I don't know how can I remove this, i try delete unused characters (spaces ed.) and put the </ul> in a echo, but noting helps.  :-[

<?php
  $extra = $pages->get('/extra/'); 
  $children = $extra->children();
  echo "<ul class='list-inline text-center extra'>";
  foreach($children as $child) {
    echo "<li><a href='{$child->url}'>{$child->title}</a></li>";
  };
  echo "</ul>";

The editor I used is Sublime Text.

But why is it only when PW the list generated? And not when I add a list manually?

I have the same issue in the Top navigation:

post-3100-0-68557800-1425637871_thumb.pn

And yes I have a GOOD Android device  ^-^

Christophe

Link to comment
Share on other sites

I’m not familiar with Sublime Text, but this seems to be a problem of both your phone and Sublime Text not honoring Unicode guidelines (check this out), albeit in different ways. Sublime Text doesn’t show you the problematic character at all and your mobile browser shows a missing glyph symbol. Try viewing your code sample from the first post on your phone. You’ll see the same rectangle right behind the closing PHP tag ?>.

Sublime Text should have a view mode that shows invisible white space characters (like tabs, spaces, and your 2028 separator). If you turn that on, you should be able to delete it easily :)

You have run into the same issue as this guy. That is to say, it’s not ProcessWire inserting the symbol ;)

  • Like 1
Link to comment
Share on other sites

Hi, I don't know how to solve this, but when viewing the source on my Android using the "VT View Source" application, it appears as if the extra character is actually after the </ul>, not before. Maybe this helps solving the problem?

Link to comment
Share on other sites

You could also try to copy the contents of the effected file, paste it in a textarea, then trow away the affected file, create one with the same name, select and copy the pasted text from the textarea and paste it back to the newly created file, press save.

Link to comment
Share on other sites

Hi guys,

Thanks for the fast answers.

I working on Mac and also have TextWranglers (good tip!)

Maybe a tip for some people: type in the url field (Mobile Chrome) before the url 'view-source:'

Ex: view-source:http://www.mysite.com

I see it now on my Nexus5.

post-3100-0-03993200-1425657122_thumb.pn

But why not a square-symbol when adding a ul-list manually?  ???

Grtz,

Christophe

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...