I'm trying to make a little side-bar menu so people can access area of the web application.
Here is what I have so far:
<ul id="navi">
<li><img src="../../Content/inicio.png" alt="Inicio" /></a></li>
<li><img src="../../Content/evaluaciones.png" alt="Evaluaciones" /></a></li>
<li><img src="../../Content/miembros.png" alt="Miembros" /></a></li>
</ul>
What is the MVC way of creating links?
Since this markup is on the Master Page, I'm thinking I'd need to specify the Area and also the Action to send the user to correct?
For example, I want the user to be taken to the Carreras/Index view when they click the third img, how can I do that?
<%=Html.ActionLink("Action Text", "Index", "Carreras")%>
is the standard way of creating an anchor/action link. There are multiple ways to link an image ... I typically use Url.RouteUrl, but any of the methods in this post would work.
Related
So I've spent a day on Google, and trying bits of jquery/javascript to do what I'm looking to do and am officially stuck.
I'm building a site using Squarespace, with the Marquee theme applied. I would like to be able to add a custom link in the primary navigation to send users to an alternative language version of each specific page.
But, I'm struggling. Ive found solutions on here that should work, but I don't think I'm applying it right. Ive tried adding a single link to the navigation and using a script on each page (in the code injection point of the head section) point that link somewhere else.
This would mean I have a single link in the navigation (which is standard across the site) pointing users to whichever page I want...on a per page basis. I know there is a solution out there....just can't make it work!
The section I need the link to work from is:
<div id="desktopNav" data-content-field="navigation-mainNav" data-annotation-alignment="bottom left">
<nav class="main-nav" id="yui_3_17_2_1_1450478013910_660">
<div class="nav-wrapper" id="yui_3_17_2_1_1450478013910_659">
<ul class="cf" id="yui_3_17_2_1_1450478013910_658">
<li class="page-collection">
<span>Menu</span>
</li>
</ul>
</div>
</nav>
</div>
None of this can be edited directly though...
I was thinking something like this could work, but I cant work out how to apply it to my situation...
Change href value for a hyperlink
Any help, gratefully received!
I fixed it...using this:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('a[href*="original.site"]').attr('href', 'http://website.com');
});
</script>
It allows me to point a single link in the navigation (which cant be edited directly) to whatever I want it to go to.
I'm trying to use Addthis (http://www.addthis.com) script to place things like Facebook "Like" buttons on my pages. When I put the "Like" code in and save it TinyMCE strips part of the code out? For example. This is the Follow Us code.
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
</div>
After I save and check again the fb:like:layout="button_count" section is removed by TinyMCE.
Note: I use TinyMCE within EpiServer CMS 6 R2
Is there a way to fix this?
Thanks.
You will need to configure tinymce not to stripout those attributes.
Have a look at the tinymce configuration parameter valid_elements.
I am using jQTouch and Phonegap and it perfectly runs in my Xcode and iPhone simulator. What I am trying to develop is to dynamically display external webpages within my application.
For example, when you first run the application it shows table with data "User Interface", "Animations" ... etc. What I want to make is when user taps on "User Interface" it should display some external web pages ( lets say google's home page).
I wrote the following code and this is inside User Interface->Edge to Edge->(here I want to dispaly the home page of google). The width:340 and height:420 will be the display area of google's home page. Please help me to make it.
<div id="edge">
<div class="toolbar">
<h1>Edge to Edge</h1>
back
</div>
<div style="width:340px; height:420px; background:red;">
<ul class="edgetoedge scroll">
<li class="sep">under construction...</li>
</ul>
</div>
</div>
Thank you
You will need to load an <iframe> into the div you want to display the content of the external page.
http://www.w3schools.com/tags/tag_iframe.asp
Make sure to add the external URL to the whitelist (ExternalHosts entry in PhoneGap.plist as per the PhoneGap for iOS FAQ: http://wiki.phonegap.com/w/page/41631150/PhoneGap%20for%20iOS%20FAQ) and set the Boolean for OpenAllWhitelistURLsInWebView to YES.
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
I am currently developing a Web App under jQTouch, and I want to know how I should proceed to redirect the user automatically to another page of my Web App.
For instance, let's suppose I have this code :
<div id="foo1">
...
</div>
<div id="foo2">
...
</div>
Now, let's suppose that the currently visible block is foo1. Which code should I write in my JavaScript file to redirect to block foo2 (as though I clicked a link with href="#foo2")?
Thanks and sorry for my English (I'm French).
You may use the jQT.goTo() to transfer to another page, e.g.
jQT.goTo('#foo2', 'slideup');
If you just want to trigger a click event on a link, you could use the click function in jQuery:
<a id="goToFoo2" href="#foo2">Go To Foo2</a>
<script>$("#goToFoo2").click()</script>
A standard link
Link
will not work, but you are on the right track, it just has to be in the correct setting (either a button, or a list). so either:
<ul class="rounded">
<li class="arrow">
Link
</li>
</ul>
or
<a class="button" href="#foo2">Link</a>
will work.