Textpattern Forum

You are not logged in. Register | Login | Help

#31 2008-09-13 23:37:30

idoremus
Member
From: NW United States
Registered: 2008-04-16
Posts: 19

Re: cbs_navigation_menu

Christophe, Thank you for this plug-in. It works as described.

I now want to modify my main menu so that I have a “member” section and a “visitor” section all on the same menu bar using ign_password_protect to separate the two. Can I nest the <txp:ign_if_logged_in></txp:ign_if_logged_in> tags within your tags:

<txp:cbs_navigation_menu sections="default,...,memberarea" titles="Home,...,<txp:ign_if_logged_in>Member's Area</txp:ign_if_logged_in>" break="li" activeclass="active" />

or would it make more sense to have two instances of <txp:cbs_navigation_menu sections=",..." titles=",..." break="li" activeclass="active" />

Thanks in advance for your help,
Ian

Offline

#32 2009-01-03 13:05:44

mavo
New Member
Registered: 2009-01-03
Posts: 1

Re: cbs_navigation_menu

hi, thanks for plugin
i am just wondering is it possible to wrap span inside every a, it is crucial for because of rounded corners I use in my navigation menu

like
<ul class=“tab”> <li><a href=”“ class=“active”><span>frontpage<span></a></li> <li><a href=”“><span>seconde page<span></a></li> <li><a href=”“><span>third page<span></a></li>
</ul>

thanks for any ideas how to implement it!

Offline

#33 2009-01-26 10:12:27

leomuradesign
New Member
Registered: 2009-01-07
Posts: 3

Re: cbs_navigation_menu

Hello everyone,

I am using the plugin (a great one Christophe!) to display a list of categories related to a section and I am wondering if it’s possible to use the active class on full urls as it does on sections.

I know that ‘activeclass’ (by default) is only applicable on sections but not on full urls because they contain ‘:’ (http://…) ) on their text string therefore the active section is not display in that case.

Any ideas?

Thanks for you hlep.

Offline

#34 2009-01-26 21:53:05

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 226
Website

Re: cbs_navigation_menu

ciao leo, rispondo in italiano che tanto capisci.. che intendi per attivarli nei full url’s. IN quale contesto?

Offline

#35 2009-01-27 06:32:46

leomuradesign
New Member
Registered: 2009-01-07
Posts: 3

Re: cbs_navigation_menu

MarcoK wrote:

ciao leo, rispondo in italiano che tanto capisci.. che intendi per attivarli nei full url’s. IN quale contesto?

Ciao Marco,

grazie per l’interessamento. Il contesto di cui parlo è quello nel quale se inserisci il nome della sezione, la ‘activeclass’ funziona mentre se al posto della sezione usi un URL tipo ‘http;//…’ che contiene appunto un simbolo come ‘:’ la activeclass’ non si attiva (come scritta peraltro scritta nel manuale del plugin).

Per chiarire la cosa ecco l’esempio:

<txp:cbs_navigation_menu sections=“sezionetaldeitali,http://mydomain.com/sezione1/http://mydomain.com/sezione2” titles=“sezionetaldeitali,sezione1,sezione2” activeclass=“active” class=“categories” break=“div” ids=“first,,,” />

dove ‘sezionetaldeitali’ è riconosciuta come sezione appunto e su essa quindi funziona ‘activeclass’ mentre gli URL non vengono riconosciuti come sezione e pertanto la active class non funziona.

La domanda quindi è questa, c’è modo di rendere gli URL’s alla stessa stregua delle sezioni?
Io credo di si, e probabilmente modificando il codice del plugin ma non saprei come però.

Grazie per adesso.
leo

Last edited by leomuradesign (2009-01-27 06:42:34)

Offline

#36 2009-01-27 07:13:15

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 226
Website

Re: cbs_navigation_menu

IL plugin legge la variabile S presente in pretext e la confronta con quelle passate nell’array da cbs…
Tu gli passi un indirizzo, quindi nel plugin dovresti trovare il punto in cui fa il confronto ed aggiungergli il confronto con l’hu.

Ad un certo punto (linea 47 circa) lui fa il controllo di cui sopra:
if($sections[$i] == $s) {

Dovresti fargli esaminare anche if($sections[$i] $s || $section[$i] hu.$s) {

controlla tramite un print se hu.$s ha bisogno di una barra in messo o è giusto cosi.

Mi rimane comunque da capire perchè vuoi inserire l’http, visto che viene comunque già letto di base…

Offline

#37 2009-03-07 14:05:20

salarrue
New Member
Registered: 2009-03-07
Posts: 2

Re: cbs_navigation_menu

HI, I’m using MLP to translate the website in 3 different languages but I cant transalate the text in the menu?

Basically how it works is that you add snippets that the plugin recognizes:

Within your chosen page, or form, type a string starting and ending with two hash characters, like this ”##my_first_snippet##”

so I need to make the plug recognize the different menu links in <txp:cbs_navigation_menu sections />

Any idea?

Last edited by salarrue (2009-03-07 14:07:37)

Offline

#38 2009-03-07 14:31:41

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,383
Website

Re: cbs_navigation_menu

salarrue, you got three replies in the MLP thread, and I’m pretty sure my example will work. If not, let me know over there and we’ll work it out.


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#39 2010-12-22 19:46:15

razauq
New Member
Registered: 2010-12-22
Posts: 2

Re: cbs_navigation_menu

I am using your plugin and it is great, but I need to declare <ul id=“menu”> but it is only letting me do <ul class=“menu”>

HELP!!!

Offline

#40 2010-12-22 21:00:27

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 562
Website

Re: cbs_navigation_menu

Looks like you can edit the plugin and change this:

if($sections[$i] == $s) {
				if($activeclass)
					$options .= ' class="'.$activeclass.'"';
				if($activenolink) {
					$out[] = tag($titles[$i], 'span', $options);
					continue;
				}
			}

To this:

if($sections[$i] == $s) {
				if($activeclass)
					$options .= ' id="'.$activeclass.'"';
				if($activenolink) {
					$out[] = tag($titles[$i], 'span', $options);
					continue;
				}
			}

(I just changed the word “class” to “id”)

Offline

Board footer

Powered by FluxBB