Home › Forum › Problemi Vari con WP › mod_rewrite: per permalink e conflitti con Prototype
-
AutorePost
-
-
7 Agosto 2009 alle 15:24 #11252essezetaPartecipante
Un saluto a tutti…
posto anche qui una domanda che sto cercando di risolvere anche su un altro forum…
ho appena finito di implementare WordPress per un sito…
tutto a posto
utilizzo Prototype per alcuni effetti
tutto a posto
poi personalizzo la struttura dei permalink
e le funzioni di Prototype non vanno più…
cerco di spiegare…
ho l’effetto toggle che mi fa lo sliding su un box richiamandolo attraverso ID
(per chi conosce un po’ Prototype sarà facile intuire perché è semplicissimo):
a href=*#* onclick=*Effect.toggle(*contactform*,*blind*); return false*
il link "morto" punta all'url della pagina cosà¬:
http://www.miodominio.org/blog/?p=3#
cerca l'elemento di ID "contactform" e me lo fa apparire...
ora che però WordPress riscrive i permalink succede che l'url della pagina è cambiato in:
http://www.miodominio.org/blog/archives/nome-articolo/
per cui il link "morto" che poi richiama la funziona punta qui
http://www.miodominio.org/blog/archives/nome-articolo/#
risultato:
non mi fa lo sliding del box con l'ID indicato...
è come se si trovasse a cercare in una location in cui l'elemento con quell'ID non c'è...
mi chiedevo però come fare ad aggirare il problema... perché i "permalink parlanti" li vorrei conservare...
chi mi sa dare una qualche dritta?
-
8 Agosto 2009 alle 13:07 #67547essezetaPartecipante
ho risolto…
scusate il falso allarme…
in pratica linkavo le librerie .js in modo da andare a riprenderle da una cartella nella root in cui erano condivise con altre pagine extra WP, cosà¬:
<script type="text/javascript" src="../stuff/js/prototype.js"></script>
<script type="text/javascript" src=".../stuff/js/effects.js"></script>
ecc.
invece che cosଠ(con le chiamate corrette di WP):
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/stuff/js/prototype.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/stuff/js/effects.js"></script>
ecc.
ora è tutto a posto, anche in mod_rewrite
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.