Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2012-01-24 16:45:31
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Comments won't go away on mobile page template!
This is so weird. I’m just in the baby steps of building my mobile templates…
When I look at the source code I see form comments_display and form comment_form even though they’re not in the page template (or the article form)… (I put comment tags at the top and bottom of all of my forms so that when I look at the source code I know what form the html is coming from)
My article form looks like this:
<!--begin form default_mobile -->
<h3 class="blacktitle"><txp:permlink><txp:title /></txp:permlink></h3>
<!--date posted-->
<div align="right" class="smallcaps"> ~ <txp:posted format="%A, %B %e, %Y" gmt="0" /></div><!--smallcaps-->
<!--tags -->
<div id="tru_tags" align="right"><txp:tru_tags_if_has_tags>tags: <txp:tru_tags_from_article /></txp:tru_tags_if_has_tags><br />
</div><!--tru_tags-->
<!--body -->
<div class="article">
<txp:body />
</div>
<!--posted time -->
<p align="right" class="noprint">— <txp:posted format="%r" gmt="0" /></p>
<!--end form default_mobile -->
and my page template looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<txp:output_form form="head_tags_mobile" />
</head>
<body>
<div id="page">
<!-- top_nav_menus begin -->
<txp:output_form form="menu_searchbox_mobile" />
<div class="clear"><!-- --></div><!--clear-->
<txp:output_form form="header_mobile" />
<div class="clear"><!-- --></div><!--clear-->
<txp:output_form form="top_links_mobile" />
<div class="clear"><!-- --></div><!--clear-->
<!-- article or list -->
<!-- breadcrumb -->
<txp:output_form form="breadcrumb" />
<!-- Category -->
<txp:if_category>
<txp:article form="default_mobile" listform="excerpt" limit="15" pageby="10" />
<txp:else />
<!-- Main Article -->
<txp:article form="default_mobile" listform="excerpt" limit="1" />
</txp:if_category>
<div class="clear"><!-- --></div><!--clear-->
<div id="bottom_nav_band">
<txp:output_form form="category_menu_mobile" />
</div><!--botom_nav_band-->
<div class="clear"><!-- --></div><!--clear-->
<div id="foot">
<!-- copyright_mobile -->
<txp:output_form form="copyright_mobile" />
</div><!--foot-->
</div><!--page-->
</body>
</html>
Last edited by WebKat (2012-01-24 16:47:29)
—
WebKat
Offline
#2 2012-01-24 16:47:58
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Comments won't go away on mobile page template!
New post because I couldn’t break out of the bc.. code!
None of the forms called have anything about comments in them. And yet I see the comments section on my test page, and see the html for it in the source…
What the heck is going on?
SOLVED: I had auto-append comments turned on in the prefs. Totally forgot that was one of the prefs you could set! Oops.
Last edited by WebKat (2012-01-24 18:07:03)
—
WebKat
Offline
#3 2012-01-24 16:57:20
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Comments won't go away on mobile page template!
Also, it isn’t obeying my max-width:100%; rule. It’s still scrolling horizontally…
—
WebKat
Offline
Re: Comments won't go away on mobile page template!
In your Textpattern preferences, make sure ‘Automatically append comments to articles?’ is set to ‘no’ – that might be the cause.
WebKat wrote:
Also, it isn’t obeying my max-width:100%; rule. It’s still scrolling horizontally…
Depending on what element you are assigning that rule too, it might not necessarily limit the width of the element to within the screen area.
For example, if you had a div container and did this…
div#container {
max-width: 100%;
padding: 40x;
}
Then that would actually be a width of 100% (the whole screen width) plus an extra 40px either side. I’d need to see the what element you are applying this to in able to help further.
Offline
#5 2012-01-24 17:59:13
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Comments won't go away on mobile page template!
Here is what I’m applying it to:
div#page {
width:100%;
max-width:100%;
}
Which is the wrapper for the whole page.
I’ll check on that setting for the comments—hadn’t even thought of that!
—
WebKat
Offline
Re: Comments won't go away on mobile page template!
So ok. That rule serves no purpose since a div is by default a block element anyway which has a 100% width unless told otherwise.
You need to use an explicit width either in pixels, better still ems, or even better percentage like so…
#page {
width: 90%;
margin: 0 auto;
}
Offline
#7 2012-01-24 21:00:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Comments won't go away on mobile page template!
WebKat wrote:
New post because I couldn’t break out of the bc.. code!
Start the first line after the code with p.
and a space :)
Offline
#8 2012-01-24 23:29:39
- WebKat
- Member
- Registered: 2007-01-16
- Posts: 301
Re: Comments won't go away on mobile page template!
Els wrote:
WebKat wrote:
New post because I couldn’t break out of the bc.. code!
Start the first line after the code with p.
and a space :)
Ahhh!!! Thank you! I’ve had that problem before :)
—
WebKat
Offline