Notice

This old forum is now only available for consultation/read. User accounts on this old website are blocked.
Please create a new account on seblod.com and use the new forum http://www.seblod.com/community/forums.
Apologies for this perturbation and thank you for your understanding!
Welcome, Guest
Username Password: Remember me

How can I remove additional DIVs
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How can I remove additional DIVs

How can I remove additional DIVs 2 years, 9 months ago #1

  • jsanglier
  • ( User )
  • OFFLINE
  • Gold Boarder
  • Posts: 280
Hi

I am using a custom template for one part of my site. This template has almost no clever markup.

However, When I add a field to a position, I end up with two additional nested DIVs that I really dont need.

As an example, I have a div in my template with the ID of footer. I get a text field and add it (via a position override with no additional markup) using the getValue call.

When I examine the result with Firebug I end up with:

<div id="footer">
<div id="cck10_Wired-Footer" class="seb_css3 vertical cck-deepest">
<div id="cck10_Wired-Footer_content">
<p>Footer information will go in here</p>
</div>
</div>
</div>

And all the associated CSS that goes with the additional two DIVs.

These added DIVs seem to be added because I have used renderPosition in the template and then used a position override to make sure I just get in the raw data of the field.

So, is there a way of using renderPosition and overrides so that I DONT get additional markup and styling?

Or do I have to simply call fields directly into my template and ignore using position overrides?


Joss
Professional Copy Writer and Composer and occasional web community consultant - Working with www.processwire.com and www.joomla.org

Re: How can I remove additional DIVs 2 years, 9 months ago #2

  • nithinp89
  • ( User )
  • OFFLINE
  • Platinum Boarder
  • Posts: 1140
Hi Joss,

Pls check on below links.

www.seblod.com/support/documentation/seb...ng-field-values.html

www.seblod.com/support/documentation/seb...g-101-overrides.html



Never forget that when using the getValue() approach, the returned value will NOT have any typo's or links applied to them, even if you've assigned them to your fields when creating your content type. This is because we access the values directly, whereas the renderField() approach uses multiple internal methods to get typo and link values and apply them to the returned value.
Best Regards
Nithin Prathapan

5 Things to Start with SEBLOD
1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum

Re: How can I remove additional DIVs 2 years, 9 months ago #3

  • jsanglier
  • ( User )
  • OFFLINE
  • Gold Boarder
  • Posts: 280
Thanks Nithin

Yes when I use just the getValue calls directly in my template, I get nice clean data.

But when I use the same calls as a position override instead, then I get additional styling that isn't adding anything useful. In fact it is adding padding values and border values that I really dont want at all.


Joss
Professional Copy Writer and Composer and occasional web community consultant - Working with www.processwire.com and www.joomla.org
  • Page:
  • 1
Time to create page: 0.13 seconds