Search Results

Search found 4141 results on 166 pages for 'render'.

Page 10/166 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Rails testing: assert render action

    - by deb
    How can I write a test to assert that the action new is rendered? def method ... render :action => :new end I'm looking for something like: assert_equal layout, @response.layout assert_equal format, @request.format I know I can't do @response.action Thanks in advance! Deb

    Read the article

  • Render partial view with updated value.

    - by janiya
    I am working on asp.net mvc project using views and partial views. Multiple partial views are being rendered in single view. Now my problem is that when ever i update some values in partial view and render it again through controller it does not show partial view with updated value.... to see updated value i have to refresh the page each time.

    Read the article

  • Supersized image captions - render outside of JavaScript

    - by Sol
    I am using the jQuery supersized script for a full screen slideshow (not the WordPress plugin as this didn't give me enough control). However, one issue that I am trying to tackle is how to render the image caption text outside of the javascript slides[ ] call - and instead, render them within the page div - to improve SEO on the page. My code works fine right now, images and the caption text are correctly displaying, but looking at the source code, there is very little text outside of the javascript (which is bad for SEO), so I would just like to improve it, if possible. I haven't been able to find any other topic on this subject and so far, I've been unsuccessful at improving on the current code, which is as follows; <!-- Supersized 3.2.7 - By Sam Dunn / One Mighty Roar (www.onemightyroar.com) Released under MIT License / GPL License --> <script type="text/javascript"> var slides=[]; <?php $my_query = new WP_Query ( array( 'post_status' => 'publish', 'post_type' => 'featured', //'numberposts' => 5, 'orderby' => 'menu_order', 'order' => 'ASC', 'showposts' => 50 )); while( $my_query->have_posts() ) : $my_query->the_post(); $slink = get_post_meta($post->ID,'FS_link',true); ?> slides.push({image : '<?php echo get_image_path(get_post_meta($post->ID, 'FS_slideimage_src', true)); ?>', title : '<div class="slidecaptioninside"><h1><?php echo the_title(); ?></h1><p><?php echo strip_tags(get_post_meta($post->ID, 'FS_fitemcaption', true)); ?>...<a href="<?php echo $slink;?>">find out more</a></p></div>', url : '<?php echo $slink;?>'}); <?php endwhile; ?> // start supersized JS $j = jQuery.noConflict(); $j(window).load(function() { $j.supersized({ //Functionality slideshow: 1, // ..... additional functions go here... slide_captions : 1, //Slide caption (Pull from "title" in slides array) slides : slides, slide_links : 'blank', progress_bar : 1, mouse_scrub: 1 }); }); </script> <div id="slidecontainer"> <div id="slidecaption"></div> <!--Thumbnail Navigation--> <div id="prevthumb"></div> <div id="nextthumb"></div> <!--additional tray divs here--> </div><!--slidecontainer--> I have tried to get Supersized to output the content into a parent div [div id="supersized"] using $j('#supersized').supersized({ but this doesn't appear to work. Has anyone managed to do this differently to improve page SEO?

    Read the article

  • OpenGL code to render ribbon diagrams for protein

    - by eipxen
    Hey all, I am looking to render ribbon diagrams of proteins using OpenGL and C++. Does anyone know if any open source code for this already exists, or if there are good guides to do this? If not, I'd prefer to figure it out myself ;) but I didn't want to reinvent the wheel, especially if the wheel was free.

    Read the article

  • MVC3 - render view that is not a method in a controller

    - by scoo-b
    I don't know how to best describe my requirement, but here goes. I'm trying to render a view from the following controller/model in a nopCommerce application: CustomerController.cs snippet: [NonAction] protected CustomerNavigationModel GetCustomerNavigationModel(Customer customer) { var model = new CustomerNavigationModel(); model.HideAvatar = !_customerSettings.AllowCustomersToUploadAvatars; model.HideRewardPoints = !_rewardPointsSettings.Enabled; model.HideForumSubscriptions = !_forumSettings.ForumsEnabled || !_forumSettings.AllowCustomersToManageSubscriptions; model.HideReturnRequests = !_orderSettings.ReturnRequestsEnabled || _orderService.SearchReturnRequests(customer.Id, 0, null).Count == 0; model.HideDownloadableProducts = _customerSettings.HideDownloadableProductsTab; model.HideBackInStockSubscriptions = _customerSettings.HideBackInStockSubscriptionsTab; return model; } CustomerNavigationModel.cs: public partial class CustomerNavigationModel : BaseNopModel { public bool HideInfo { get; set; } public bool HideAddresses { get; set; } public bool HideOrders { get; set; } public bool HideBackInStockSubscriptions { get; set; } public bool HideReturnRequests { get; set; } public bool HideDownloadableProducts { get; set; } public bool HideRewardPoints { get; set; } public bool HideChangePassword { get; set; } public bool HideAvatar { get; set; } public bool HideForumSubscriptions { get; set; } public CustomerNavigationEnum SelectedTab { get; set; } } public enum CustomerNavigationEnum { Info, Addresses, Orders, BackInStockSubscriptions, ReturnRequests, DownloadableProducts, RewardPoints, ChangePassword, Avatar, ForumSubscriptions } MyAccountNavigation.cshtml snippet: @model CustomerNavigationModel @using Nop.Web.Models.Customer; @if (!Model.HideInfo) { <li><a href="@Url.RouteUrl("CustomerInfo")" class="@if (Model.SelectedTab == CustomerNavigationEnum.Info) {<text>active</text>} else {<text>inactive</text>}">@T("Account.CustomerInfo")</a></li>} Views: @Html.Partial("MyAccountNavigation", Model.NavigationModel, new ViewDataDictionary()) I am aware that it is unable to render MyAccountNavigation because it doesn't exist in the controller. However, depending on which page the syntax is placed it works. So is there a way to achieve that without changing the code in the controller? Thanks in advance.

    Read the article

  • jQuery fullcalendar custom event

    - by raulriera
    Hi, I was wondering how to apply a custom render to a event... I want to be able to preppend the "patient" name of a practice agenda... eventRender: function(event, element) { console.log(element[0]); } This currently shows the HTML output in the console, but I don't know how can I access it (in a pretty jquery manner) in order to manipulate the data within. Thanks

    Read the article

  • Using CreateOrthographicOffCenter in XNA

    - by Jeffrey Kern
    I'm trying to figure out how to draw graphics in XNA, and someone else suggested this. But before I attempt to use this... If I create and use this camera, and set LEFT,TOP to 0 and WIDTH=256 and HEIGHT=240, anything I render to the screen will use these coordinates? So a box with a width and height of 1, if set to 0,0 will take up space from 0,0 to 1,1?

    Read the article

  • django url from another template than the one associated with the view-function

    - by dana
    Heyy there, i have an application, and in my urls.py i have something like that: urlpatterns = patterns('', url(r'^profile_view/(?P<id>\d+)/$', profile_view, name='profile_view'),) meaning that the profile_view function has id as a parameter. Now, i want to call that function from another template than the one associated with the def-view that has this url. How should i do that? i have to put two render_to_response to one same function, in order to render the objects from both models? thank you!

    Read the article

  • How fast 3D rendering a still image per client request, in server can be made?

    - by user1767797
    I am trying to make a service that needs to quickly render simple 3D scenes on the server, and then return them as a JPEG. It should be able to accommodate mass users (client) so that it serve rendered image per client request. User-HTML-Server-(perhaps renderfarm)-Result display. Is current technology able to give a return really quickly like in 5 seconds, after it renders 3D scene like clothes ?? Thanks.

    Read the article

  • ASP.NET MVC: Render checkbox list from MultiSelectList

    - by aximili
    How do you associate a MultiSelectList with a list of checkboxes? eg. I pass something like this to the model model.Groups = new MultiSelectList(k.Groups, "Id", "Name", selectedGroups) How should I render it? This doesn't work <% foreach (var item in Model.Groups.Items) { %> <input type="checkbox" name="groups" value="<%=item.Value%>" id="group<%=item.Value%>" checked="<%=item.Selected?"yes":"no"%>" /> <label for="group<%=item.Value%>"><%=item.Text%></label> <% } %> Error CS1061: 'object' does not contain a definition for 'Value'... Is there a HTML Helper method that I can use? (Then, unless it is straightforward, how should I then get the selected values back on the Controller when the form is submitted?)

    Read the article

  • Minimal way to render Wiki Syntax (for example MoinMoin Wiki)

    - by Alex
    I enjoy using to Wikis to document all kind of stuff (recently I used MoinMoin, so I am used to that syntax). No I am looking for a more light weight solution, for documents were setting up a moinmoin server is to much hassle. What is the "easiest" way to render a .txt file in Wiki syntax. (for example by displaying it, or converting it to HTML). it should work on Linux, but the more platform in-dependent, the better. Maybe there is even a Javascript based solution?

    Read the article

  • Build and render infinite hierarchical category tree from self-referential category table

    - by FreshCode
    I have a Categories table in which each category has a ParentId that can refer to any other category's CategoryId that I want to display as multi-level HTML list, like so: <ul class="tree"> <li>Parent Category <ul> <li>1st Child Category <!-- more sub-categories --> </li> <li>2nd Child Category <!-- more sub-categories --> </li> </ul> </li> </ul> Presently I am recursively rendering a partial view and passing down the next category. It works great, but it's wrong because I'm executing queries in a view. How can I render the list into a tree object and cache it for quick display every time I need a list of all hierarchical categories?

    Read the article

  • Easiest way to render Wiki Syntax (for example MoinMoin Wiki)

    - by Alex
    I enjoy using to Wikis to document all kind of stuff (recently I used MoinMoin, so I am used to that syntax). No I am looking for a more light weight solution, for documents were setting up a moinmoin server is to much hassle. What is the "easiest" way to render a .txt file in Wiki syntax. (for example by displaying it, or converting it to HTML). it should work on Linux, but the more platform in-dependent, the better. Maybe there is even a Javascript based solution?

    Read the article

  • How do I render 3d model into directshow virtual camera output

    - by Mr Bell
    I want to provide a virtual webcam via DirectShow that will use the video feed from an existing camera running some tracking software against it to find the users face and then overlay a 3d model oriented just that it appears to move the users face. I am using a third party api to do the face tracking and thats working great. I get position and rotation data from that api. My question is whats the best way to render the 3d model and get into the video feed and out to direct show? I am using c++ on windows xp.

    Read the article

  • How to render partial.js in rails 3

    - by julian-mann
    Using rails3 - I have a project with many tasks. I want to use javascript to build the UI for each task. I figured I could display those tasks on the projects show page by rendering a javascript partial for each. I can't get 'tasks/show' to see tasks/show.js.erb Any ideas? In projects/show.html.erb <div id="tasks"> <%= render(:partial => "tasks/show", :collection => @project.tasks) %> </div> tasks/show.js.erb $("tasks").append(new TaskWidget(task.id)) I get the errors ActionView::MissingTemplate in Projects#show Missing partial tasks/show with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths .... around line #13 Thanks

    Read the article

  • HTML + CSS dynamic render in flash?

    - by Ole Jak
    I have HTML + CSS text. I need some lib with simple function like "Render String Var conteining HTML" So no external files (like in flash lib called HTMLwraper you just have to play your SWF on top of HTML). dinamic! I give it string it renders It into some conteiner (not as a bitmab but as if it was real HTML dynamically rendered in flash). (And I need real HTML + CSS support not what normal rich text block gives us) I am going to use it in with Flex (Flash Builder) so I like MXML component model but even pure flash AS3 will workout. It should be Free and Opensource (any license like GPL, LGPL etc will be ok). So Is out there such flash\flex library for HTML + CSS dynamic rendering (rfom given String or XML)?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >