Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Almost finished..
Mmm. I get a parse error with Safari Web Inspector around line 124 of the new livesearch JS, served up by stm_javascript and called from the Head:
You did copy little PHP alongside the JavaScript ;) did’ay. To avoid that, you could copy this instead: http://solborg.fhs.no/?file=livesearch Place it to the javascript file, and voila we have avoided the php.
PS. If that file’s code looks little messy, (some marks missing etc.) then look at it’s source code and it will look correct.
Cheers!
Last edited by Gocom (2008-01-06 13:59:24)
Offline
Re: Almost finished..
Gocom wrote:
You did copy little PHP alongside the JavaScript ;) did’ay. To avoid that, you could copy this instead: http://solborg.fhs.no/?file=livesearch Place it to the javascript file, and voila we have avoided the php.
Yeah I am a ****ing idiot. Duh.
Fixed now. Thanks Jukka. I replaced the original rss_live_search plugin, so whatever is in there is left as-is.
On to the next problem…!
Offline
Re: Almost finished..
I think this drop down menu will suit you.
If you look at the source, you will find the css in the head and the menu you want starts at div class=“menu”
Dozy P My attempt at music
Offline
Re: Almost finished..
Thanks Peter. I will bookmark the page and look to implementing a CSS only menu once I fix the JS validation errors, plus adjust some more things on the site.
Offline
Re: Almost finished..
Mmmm. Came across an interesting problem with the site, while changing the layout of one of the main sections of the site. See here
The first article on the left is the latest, followed by the next 3 below. Right side, 20 article offset by the previous 4.
Question is – what’s the best way to keep the same layout in an individual page? Offsets don’t work in individual pages it seems. Late here (early morning) and right now I don’t see the way, so any help would be gratefully received….!
Offline
Re: Almost finished..
re: dropdowns
Suckerfish dropdowns are cleaner code wise (plus you don’t have to wade through the page’s source code for the CSS). Just throw the IE JS into a conditional comment for IE<7, and you’re good to go!
For offsets, are you calling the offsets from the article form or page template?
Offline
Re: Almost finished..
Re the dropdowns – now I realise why I chose the P7 code – its actually really easy to use. The JS is very little too. CSS Play menus are easier if one is using manual links – with section lists or category lists it gets difficult.
Offsets from the page. Code:
<div id="leftlarge">
<txp:if_individual_article>
<txp:article limit="1" form="blog_article_single" />
<txp:else/>
<h2 class="slashes blue">Hva Skjer?///</h2>
<txp:article limit="1" form="blog_article_single" />
<txp:article limit="3" form="blog_article_list" offset="1" />
</txp:if_individual_article>
</div>
<div id="rightsmall">
<ul class="smd_slimbox">
<txp:smd_slimbox category="hva_skjer" limit="36" />
</ul>
<txp:if_individual_article>
<txp:else/>
<txp:article limit="20" form="hva_skjer_side_newslist" offset="4" />
</txp:if_individual_article>
Last edited by jstubbs (2008-01-07 06:38:06)
Offline
Re: Almost finished..
I don’t think my previous post was clear – I am using the code above in the page – not a form. The site’s page ma be viewed here
Offline
Re: Almost finished..
jstubbs wrote:
I don’t think my previous post was clear – I am using the code above in the page – not a form. The site’s page ma be viewed here
The offset problem is caused because you use <txp:article />. And as we know <txp:article /> is content sensitive, meaning that in individual article, it will show only one, and specific article, and overrides all offset and limit attributes.
You have to try using <txp:article_custom /> and only leave there <txp:article /> to view individual / section paged articles.
Cheers!
Last edited by Gocom (2008-01-08 02:32:43)
Offline