Added Custom Group in Template, Getting Odd Characters: � ��

More
13 years 9 months ago #9568 by TheSoMeEx
So, I added an extra group for a new project I'm trying, and I was going to just add each field in individually, but my site hosts 3 sites with 17 more in the works, so if anyone wanted to add a field, I'd have to code each, rather than them playing in the template...

Anyway, here are my attempts.

I added this to the item page:
Code:
<!-- BOF tagdets block -->    <?php if (isset($this->item->positions['tagdets'])) : ?>       <?php foreach ($this->item->positions['tagdets'] as $field) : ?>    <div class="tagdets field_<?php echo $field->name; ?>"> <span class="value field_<?php echo $field->name; ?>"><?php echo $field->display; ?></span>       <div class="clear"></div>    </div>       <?php endforeach; ?>    <?php endif; ?> <!-- EOF tagdets block -->

And this to the item.xml file:
Code:
<group>tagdets</group>

It is allowing me to put fields in the group section in the backend template, and it is displaying them on the front end, but it is also showing a bunch of odd characters:

� � � �
www.365daysofstyle.com � �� �
� �
� �� �� �


And so on. I've attached an image.

Any ideas?

Like I said, I can work around it, but I'd like an extensible solution. *smiles*

Thanks for any feedback!

--
Heather M. Claus
910-538-8901
I'm Building a Network of Niche Sites with a Shared Community - in BETA now!
www.365DaysofStyle.com
www.twitter.com/365DaysofStyle
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #9581 by kenmcd
.
That question mark inside a diamond character usually indicates a character encoding issue.
The character code does not exist in UTF-8 so that is what appears.

Somehow the "bad" characters are being introduced.
It could be an editor issue.
Or ? ? ?


.

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #9584 by TheSoMeEx
How weird... I thought I'd posted a reply earlier tomorrow.

Anyway, the characters show before and after every field in that group.

They do not show if those fields are in any other group.

Some characters show even if all the code that is there is:
Code:
<!-- BOF tagdets block --> <?php if (isset($this->item->positions['tagdets'])) : ?> <?php endif; ?> <!-- EOF tagdets block -->

Not as many... As the fields are not there, but that tells me something, anyway.

I'm wondering if I need to put that group info somewhere other than just in the template and XML.

Any thoughts?

The page is here:

www.365daysofstyle.com/style-tag/nats

Thank you!

--
Heather M. Claus
910-538-8901
I'm Building a Network of Niche Sites with a Shared Community - in BETA now!
www.365DaysofStyle.com
www.twitter.com/365DaysofStyle

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #9586 by kenmcd
.
My guess is character issues introduced by the editor when the template was edited.
From looking at the page HTML code it looks like CR/LF issues (DOS vs. UNIX), or?

I can see the characters in the HTML between the various page elements.
So it looks like editor CR/LF issues.

[attachment=0:2vhu9076]<!-- ia0 -->365dayasofstyle-character-issues.png<!-- ia0 -->[/attachment:2vhu9076]


I can delete the characters from the HTML as you can see in the image above.
The junk characters are gone above her image.
And below that in Firebug you can see the characters between the page elements.

What editor did you use, and on what operating system?

Please ZIP-up the template and attach it here if you would like me to take a look at it.

.
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #9587 by TheSoMeEx
I've edited a million of these, but this is the first time I've seen these characters added in.

I'm working in both Dreamweaver (sometimes, when I"m lazy) and TextEditor on Mac OS 10.5.8.

It was adding spaces, which were translating incorrectly. I removed them in the text editor, which removed them on the page.

*smiles*

Thank you!

--
Heather M. Claus
910-538-8901
I'm Building a Network of Niche Sites with a Shared Community - in BETA now!
www.365DaysofStyle.com
www.twitter.com/365DaysofStyle

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.453 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline