So I am working on Joomla 1.5 and retro fitting an existing website to work with this CMS. I've got most of the templates down and I have created Modules for Side navigation on the internal pages. However, on the original website, php in clauses are used to change the class of the link to show the current page the visitor was on (e.g
<a <?php if ($page=="career_opportunities") echo "class=\"currentpage\""; ?> href="?page=career_opportunities">Career Opportunities</a><br/>
<a <?php if ($page=="locations") echo "class=\"currentpage\""; ?> href="?page=locations">Practice Locations</a>
</div>
is it possible for me to maintain this structure in the new side navigation menu I created in joomla? Do I have to make it HTML customized type Module? Do I need to find a way to capture the current page's ID? Where should I begin?
Thank you in advance
You can do it by using css also which will be much easy for you to handle this using css.
Related
I am new to Scala and am trying to build an href link to another page within a website that was already built with HTML and JavaScript. All the links are set up as:
<a href="mypage.html">
I have been researching Scala and understand that it is more routing and configuration than just referring to a another page. I also understand that the other html pages seem to be used as a Single Page Application setup using the #content tag in the main.scala.html page. I may be wrong on this description, but this is how it makes sense to me.
I have set up a new Scala page and am referencing it in my HTML:
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-6 col-ss-12 margbot30">
<a class="services_item" href="#views.html.login3(loginForm)">
<p>
<b>New</b> User Account
</p> <span>Sign up for a user account</span>
</a>
</div>
It does not give me an error, but actually show that login3.scala.html page in that <div> tag. I wanted to have the text clicked and then open that page.
How do I get this link or route to work correctly?
I found this post, but I am still not sure what to do:
Play! Framework - creating simple html links
I appreciate the help and any code examples.
What "#views.html.login3(loginForm)" is doing is invoking the Scala function login3 and the resulting content is being rendered into the page.
Instead of thinking of pages linking to pages, think of pages linking to controllers.
If you have a controller like this:
package controllers;
class FooController extends Controller {
def foo = Action { request =>
Ok(views.html.foo())
}
def bar = Action { request =>
Ok(views.html.bar())
}
}
This is exposed via the routes file as
GET /foo controllers.FooController.foo
POST /bar controllers.FooController.bar
In your views, you then define your hyperlinks using the generated routing:
whatever
So in your case, instead of using
<a class="services_item" href="#views.html.login3(loginForm)">
you would instead have
<a class="services_item" href="#routes.SomeController.theFunctionThatRendersLogin3()">
For my selfhosted Wordpress blog, i wish to add Feedburner email subscription form.
Embed code from feedburner site:
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=[BLOGNAME]', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
My issue is, i dont want the popup window to show up. That thing is so 80's stuff.
Instead, is it possible to show the popup contents inline? Using JS or PHP or something?
Check out how div contents change over click here using JS: http://www.willmaster.com/library/web-development/replace-div-content.php
Would be great if something similar could be worked out.
I guess this is easy to do but i have limited knowledge on web designs and php/js/forms.
Thanks in advance.
PS: Please do not suggest plugins. I hate installing plugins unless absolutely necessary.
You can change target="popupwindow" to target="_self" or target="_blank", it can load in current page or go to a new page.
I'd like to integrate dokuwiki as part of a Bootstrap site, within a div. Is this possible? I've tried a php include:
<?php include('dokuwiki/index.php'); ?>
but this effectively redirects - it just generates a completely new page, replacing the existing html. Note that the Bootstrap plugin doesn't do the job.
For a quick solution, it might be the time to use an HTML Frame.
I'm trying to install a Magento theme.I am trying to install it by coping theme's app,skin and js folder into magento's app,js and skin folder.Theme works okay except the home page.
In homepage's content section i have add this:
<div>
{{block type="catalog/product_list" template="catalog/product/my_template.phtml"}}
</div>
which loads theme's template and sets its design but in my case it doesn't apply the template, What i lack here?
Other Pages like About us,Contact us are working according to theme but not homepage..
In the other pages which are working,content written in content section is directly a data,where in homepage it is a reference to a template called "my_template.phtml"..
help me guys!
Currently working with Zend Sub form in Zend framework to achieve Multi page form.
This is the example i'm using at the moment
http://framework.zend.com/manual/en/zend.form.advanced.html
Managed to get everything working nicely but I wanted to have a 'Back' button on the forms so when the users press on the “back” button the previous form will re display with entered data.
I'm wondering is there any tutorial on the net teaches this or is it easy to code this functionality?
Thank you so much. PS I Love stackoverflow community :)!
Its a structuring and naming thing.
I'm going to psuedo-code and talk you through this, let me know if you need me to type out a full example
Assumption:
MultiPageForm has many SubForms that represent pages.
when you add these subforms to the parent form you name them something intelligent.
so for example, if your form was at /register, use an optional url paramater */register/page/{that_intelligent_subform_name_from_before}* to build out a navigation
<ul>
<li>Step 1</li>
<li>Step 2</li>
<li>Step 3</li>
</ul>
then in your controller:
1. pull out the page param
2. fetch the subform with that name from the multipage form
3. prepopulate the subform
4. send the subform to the view