Form-style drop down menu help [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Form-style drop down menu help [SOLVED]

Post by atomickarma »

Hi

I need to build a drop down menu that includes all news items, and is configurable to show news items based on category.

It needs to be a form-style drop down rather than a css drop down.

I've had a good browse and found a couple of form menus for pages, but don't seem to be able to adjust these to show news, only pages.

I'm using 1.5.4 "Carolina"

thanks,

Christian
Last edited by atomickarma on Sun Jul 26, 2009 9:12 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Form-style drop down menu help

Post by Dr.CSS »

You may want to look into learning drop downs here...

http://www.w3schools.com/default.asp

This is where I picked up how to do a menu template to be a drop sown to pick selections...

http://www.medtechglobal.com/  upper right corner is a menu template drop sown to pick the section of the page structure, and w/o the w3school help a long time ago I never would have learned enuf to do the main menu for that site...
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

Dr. CSS wrote: You may want to look into learning drop downs here...

http://www.w3schools.com/default.asp

This is where I picked up how to do a menu template to be a drop sown to pick selections...

http://www.medtechglobal.com/  upper right corner is a menu template drop sown to pick the section of the page structure, and w/o the w3school help a long time ago I never would have learned enuf to do the main menu for that site...
Hi - I think you've misunderstood my request - I'm quite capable of constructing a drop down menu. The problem isn't this it is with picking up the news items titles in the menu.
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

Here's an example - on http://www.kasterborous.com/news.asp there's a drop down menu on the bottom half of the page which is a list of all previous items.

I'm trying to replicate this but the closest I've got is using a global item that draws a list of all previous items, calling this in the page template and then wrapping this in the form html.

Unfortunately I get all links in the same line, which is understandable given the way I'm doing it. What I can't work out is how to get each entry on its own line.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Form-style drop down menu help

Post by Dr.CSS »

If "I'm quite capable of constructing a drop down menu" is true then go to content > news and summary template tab hit create new and make one there and call it in a page....

All you have to do is figure out what part of the news template you want to use...
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

Dr. CSS wrote: If "I'm quite capable of constructing a drop down menu" is true then go to content > news and summary template tab hit create new and make one there and call it in a page....

All you have to do is figure out what part of the news template you want to use...
There's really no need to respond in that manner. If it is so simple why isn't it in the CMSMS documentation?

I'm certain that if you had read my request properly in the first place, not to mention my responses, you would realise that your initial response was incorrect.
Last edited by atomickarma on Sun Jul 26, 2009 8:33 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Form-style drop down menu help

Post by calguy1000 »

it's not in the CMS documentation because it's so trivially simple it's ridiculous

All that is needed is a new News summary template with 85% of the display removed and built into a ... statement.
.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Form-style drop down menu help

Post by calguy1000 »

This took me 10 minutes to build:
http://test.techcom.dyndns.org/cms_16_dev/index.php?page=news-dropdown

URL not expected to live past a few days.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

I've tried around a dozen variations of this:

Code: Select all

<!-- Start News Display Template-->
<FORM ACTION="../cgi-bin/redirect.pl" METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">Choose...</OPTION>

{if $pagecount > 1}
  <p>
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
 {$nextpage} {$lastpage}
{/if}
</p>
{/if}

<OPTION VALUE=''">{foreach from=$items item=entry}</OPTION>
</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>
<div class="NewsSummaryLink">
	{$entry->titlelink}

</div>
{/foreach}
<!-- End News Display Template -->
and when I call it I either get every item in one drop down menu entry, or every item with its own Go button.

Please accept my most heartfelt apologies for not being as familiar with the code, tags etc as yourselves. If I was, I wouldn't need to post this request.

I know I'm close and I'll take a push in the right direction if you wanna keep leading me on but there's no need for the bad attitude.
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

calguy1000 wrote: This took me 10 minutes to build:
http://test.techcom.dyndns.org/cms_16_dev/index.php?page=news-dropdown

URL not expected to live past a few days.
That's great Calguy. I'm certain it IS simple but after 5 days I'm not finding my way here. Thanks for the demo.
atomickarma
Forum Members
Forum Members
Posts: 18
Joined: Wed Sep 13, 2006 9:52 am

Re: Form-style drop down menu help

Post by atomickarma »

This is the closest I've got:

Code: Select all

<!--Start News Display Template-->
<FORM ACTION="../cgi-bin/redirect.pl" METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">Choose...</OPTION>




{foreach from=$items item=entry}
<OPTION VALUE="{$entry->titlelink}"></OPTION>
{/foreach}
</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>

	
<!-- End News Display Template -->
I think this is probably going to do what I want.

I am astonished however at the dismissive attitude. It wasn't even in good spirits. When I first came here in 2006, people couldn't throw enough help at me. What's more disappointing though is how this totally backs up an argument that I fought in a course debate last term about how open source communities are exclusive and restrictive to newcomers.

I'm not even a newcomer and you guys - while granting me with posts - have done me a disservice by making assumptions and being generally the exact type of characters I said weren't floating around here and SMF.

Very disappointing.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Form-style drop down menu help [SOLVED]

Post by Dr.CSS »

Sorry I figured you would at least look at the source to how it was made...

 

Region: Global

Global
Australia
New Zealand



Ok so now I need the form, select, options, so 1 nonlinked option then the ones I want, I need a title link so in news summary template I just need some parts of this...


moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}


 

Region: Global
{foreach from=$items item=entry}
moreurl}">Your Text
{/foreach}



Want to have your form to do something else it looks like you can handle it, you caught most of it quicker than I did...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Form-style drop down menu help [SOLVED]

Post by calguy1000 »

Why you needed the perl code I dunno... its possible to do this directly in javascript... or if necessary (and I've already posted this in various posts) directly with smarty.

"You can give a man a fish and he eats for a day, but if you teach a man to fish, he eats for a lifetime, and can also teach others to fish".
Last edited by calguy1000 on Mon Jul 27, 2009 12:27 am, edited 1 time in total.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Form-style drop down menu help [SOLVED]

Post by Dr.CSS »

I hacked that together by looking at other drop down selection things and couldn't get it to work with out it...

I thought he had it figured out [solved] so I was giving him my thought process on how I would have used my links to find a solution, if some one would have told me the same thing that is what I would have done...
Post Reply

Return to “Layout and Design (CSS & HTML)”