Search Results

Search found 6941 results on 278 pages for 'drupal views'.

Page 57/278 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common ta

    - by zurna
    I get "The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified." error with the following code. I initially had two tables, ADSAREAS & CATEGORIES. I started receiving this error when I removed CATEGORIES table. Select Case SIDX Case "ID" : SQLCONT1 = " AdsAreasID" Case "Page" : SQLCONT1 = " AdsAreasName" Case Else : SQLCONT1 = " AdsAreasID" End Select Select Case SORD Case "asc" : SQLCONT2 = " ASC" Case "desc" : SQLCONT2 = " DESC" Case Else : SQLCONT2 = " ASC" End Select ''# search feature ---> Select Case SEARCHFIELD Case "ID" : SQLSFIELD = "AND AdsAreasID" Case "Ads Areas" : SQLSFIELD = "AND AdsAreasName" Case Else : SQLSFIELD = "" End Select Select Case SEARCHOPER Case "eq" : SQLSOPER = " = " & SEARCHSTRING Case "ne" : SQLSOPER = " <> " & SEARCHSTRING Case "lt" : SQLSOPER = " <" & SEARCHSTRING Case "le" : SQLSOPER = " <= " & SEARCHSTRING Case "gt" : SQLSOPER = " >" & SEARCHSTRING Case "ge" : SQLSOPER = " >= " & SEARCHSTRING Case "bw" : SQLSOPER = " LIKE '" & SEARCHSTRING & "%' " Case "ew" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "' " Case "cn" : SQLSOPER = " LIKE '%" & SEARCHSTRING & "%' " Case Else : SQLSOPER = "" End Select ''# search feature ---> SQL = "SELECT * FROM ( SELECT A.AdsAreasID, A.AdsAreasName, ROW_NUMBER() OVER (ORDER BY A.AdsAreasID) As Row" SQL = SQL & " FROM ADSAREAS A" SQL = SQL & " WHERE Row > ("& RecordsPageSize - RecordsPerPage &") AND Row <= ("& RecordsPageSize &") ORDER BY" & SQLCONT1 & SQLCONT2 Set objXML = objConn.Execute(SQL)

    Read the article

  • Best Practice for Shell Layout and Switching Views - Prism, SL4, On Demand Load Modules

    - by kmacmahon
    I am learning Prism, and I have a question on the best approach for the main Shell. Assuming the Shell has 2 regions: Toolbar, Main. The toolbar has 3 main buttons that each represent a different On Demand Load Module. Each of these modules currently register themselves as fitting in the Main Region. When I click one of the buttons I want to do the following: Notify any active view that its switching, with an option to cancel if there is a pending action still required. This might cascade to child views. If the action isn't cancelled then load the on demand module if it has not yet been loaded, else activate it within the region. Should these three modules all fit in the same Region or should my shell have 3 regions defined within content presenters? One of the areas I got stuck on was that when you register a view from the Module Initialize, it doesn't get added with a strongly typed name, so when I tried to determine if my view was already added to the region with GetView(viewname) it always returns null, so I end up adding another view to the region.

    Read the article

  • How do I DRY up my CouchDB views?

    - by James A. Rosen
    What can I do to share code among views in CouchDB? Example 1 -- utility methods Jesse Hallett has some good utility methods, including function dot(attr) { return function(obj) { return obj[attr]; } } Array.prototype.map = function(func) { var i, r = [], for (i = 0; i < this.length; i += 1) { r[i] = func(this[i]); } return r; }; ... Where can I put this code so every view can access it? Example 2 -- constants Similarly for constants I use in my application. Where do I put MyApp = { A_CONSTANT = "..."; ANOTHER_CONSTANT = "..."; }; Example 3 -- filter of a filter: What if I want a one view that filters by "is this a rich person?": function(doc) { if (doc.type == 'person' && doc.net_worth > 1000000) { emit(doc.id, doc); } } and another that indexes by last name: function(doc) { if (doc.last_name) { emit(doc.last_name, doc); } } How can I combine them into a "rich people by last name" view? I sort of want the equivalent of the Ruby my_array.select { |x| x.person? }.select { |x| x.net_worth > 1,000,000 }.map { |x| [x.last_name, x] } How can I be DRYer?

    Read the article

  • WPF : Multiple views, one DataContext

    - by zapho
    Hi, I'm working on a WPF application which must handle multiple screens (two at this this time). One view can be opened on several screens and user actions must be reflected consistently on all screens. To achieve this, for a given type of view, a single DataContext is instantiated. Then, when a view is displayed on a screen, the unique DataContext is attached to it. So, one DataContext, several views (same type of view/xaml). So far so good. It works quite well in most cases. I do have a problem with a specific view which relies on ItemsControl. These ItemsControl are used to display UIElements dynamically build in the ViewModel/DataContext (C# code). These UIElements are mostly Path objects. Example : <ItemsControl ItemsSource="{Binding WindVectors}"> <ItemsControl.Template> <ControlTemplate TargetType="{x:Type ItemsControl}"> <Canvas IsItemsHost="True" /> </ControlTemplate> </ItemsControl.Template> </ItemsControl> Here, WindVectors is a ObservableCollection<UIElement>. When the view is opened the first time, everything is fine. The problem is that when the view is opened one another screen, all ItemsControl are removed from the first screen and displayed one the second screen. Other WPF components (TextBlock for instance) on this view react normally and are displayed on both screens. Any help would be greatly appreciated. Thanks. Fabrice

    Read the article

  • Simple ASP.NET MVC views without writing a controller

    - by Jake Stevenson
    We're building a site that will have very minimal code, it's mostly just going to be a bunch of static pages served up. I know over time that will change and we'll want to swap in more dynamic information, so I've decided to go ahead and build a web application using ASP.NET MVC2 and the Spark view engine. There will be a couple of controllers that will have to do actual work (like in the /products area), but most of it will be static. I want my designer to be able to build and modify the site without having to ask me to write a new controller or route every time they decide to add or move a page. So if he wants to add a "http://mysite.com/News" page he can just create a "News" folder under Views and put an index.spark page within it. Then later if he decides he wants a /News/Community page, he can drop a community.spark file within that folder and have it work. I'm able to have a view without a specific action by making my controllers override HandleUnknownAction, but I still have to create a controller for each of these folders. It seems silly to have to add an empty controller and recompile every time they decide to add an area to the site. Is there any way to make this easier, so I only have to write a controller and recompile if there's actual logic to be done? Some sort of "master" controller that will handle any requests where there was no specific controller defined?

    Read the article

  • Spring MVC- several parts/views from a controller

    - by leeeroy
    i'm looking into using Spring MVC - how would I structure the fact that a page can be composed of several different views Consider a controller that's basically: public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Post> posts = repository.getNewPosts(); return new ModelAndView("posts", "posts", posts); } However, I decide that on every page, I'd also want a side "pane" that shows data based on some logic. That "pane" would just be a .jsp that gets included from the above "posts" view, and I could change my controller to: public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Post> posts = repository.getNewPosts(); List<Items> items= repository.getItems(); return new ModelAndView("model", "model", new MyCommonViewModel(posts,items)); } But then I'd have to change every controller to also do List<Items> items= repository.getItems(); , and change everything again the next time I come up with something new. This seems messy. How do I structure this ? `

    Read the article

  • Android - attach data to views

    - by Leonti
    Hi! In my application I create dynamic rows in table much as in this tutorial: http://en.androidwiki.com/wiki/Dynamically_adding_rows_to_TableLayout for(int i = startDay; i < startDay + 7; i++){ /* Create a TextView to be the row-content. */ TextView day = new TextView(this); day.setText(Integer.toString(i)); day.setLayoutParams(new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); day.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Log.i("Listener: ", "Click"); } So now when I click on a TextView I can register click event, but how do I determine which TextView was clicked? Not just an object which I get with an event but data like which day number was clicked? Ideally I would want to have data attached to every view I create dynamically. Something like data() method in Javascript jQuery. Right now I can see only 1 way to solve this - while creating TextView add id with data and when clicked - get id back and parse it to get my data. But it strikes me as ugly approach. Is there a way to attach arbitrary data to android views?

    Read the article

  • How to create a paging scrollView with space between views

    - by user1558819
    I followed the tutorial about how to create a scrollView Page Control: http://www.iosdevnotes.com/2011/03/uiscrollview-paging/ This tutorial is really good and I implement well the code. Here my question: I want to put a space between the my PageViews, but when it change the page it show the space between the views in the next page. The scroll must stop after the space when I change the page. Someone can help me? I change the tutorial code here: - (void)viewDidLoad { [super viewDidLoad]; NSArray *colors = [NSArray arrayWithObjects:[UIColor redColor], [UIColor greenColor], [UIColor blueColor], nil]; #define space 20 for (int i = 0; i < colors.count; i++) { CGRect frame; frame.origin.x = (self.scrollView.frame.size.width + space) * i; frame.origin.y = 0; frame.size = self.scrollView.frame.size; UIView *subview = [[UIView alloc] initWithFrame:frame]; subview.backgroundColor = [colors objectAtIndex:i]; [self.scrollView addSubview:subview]; [subview release]; } self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * colors.count+ space*(colors.count-1), self.scrollView.frame.size.height); } Thanks,

    Read the article

  • How to refactor models without breaking WPF views?

    - by Tim Murphy
    I've just started learning WPF and like the power of databinding it presents; that is ignoring the complexity and confusion for a noob. My concern is how do you safely refactor your models/viewmodels without breaking the views that use them? Take the following snippet of a view for example: <Grid> <ListView ItemsSource="{Binding Contacts}"> <ListView.View> <GridView> <GridViewColumn Header="First Name" DisplayMemberBinding="{Binding Path=FirstName}"/> <GridViewColumn Header="Last Name" DisplayMemberBinding="{Binding Path=FirstName}"/> <GridViewColumn Header="DOB" DisplayMemberBinding="{Binding Path=DateOfBirth}"/> <GridViewColumn Header="# Pets" DisplayMemberBinding="{Binding Path=NumberOfPets}"/> <GridViewColumn Header="Male" DisplayMemberBinding="{Binding Path=IsMale}"/> </GridView> </ListView.View> </ListView> </Grid> The list is bound to the Contacts property, IList(Of Contact), of the windows DataSource and each of the properties for a Contact is bound to a GridViewColumn. Now if I change the name of the NumberOfPets property in the Contact model to PetCount the view will break. How do I prevent the view breaking?

    Read the article

  • Passing contextual info to Views in ASP.NET MVC

    - by Andrey
    I wonder - what is the best way to supply contextual (i.e. not related to any particular view, but to all views at the same time) info to a view (or to master page)? Consider the following scenario. Suppose we have an app that supports multiple UI languages. User can switch them via UI's widgets (something like tabs at the top of the page). Each language is rendered as a separate tab. Tab for the current language should not be rendered. To address these requirements I'm planning to have a javascript piece that will hide current's language tab on the client. To do this, I need current's language tab Id on the client. So, I need some way of passing the Id to master page (for it to be 'fused' into the js script). The best thing I can think of is that all my ViewModels should inherit some ViewModeBase that has a field to hold current language tab Id. Then, whatever View I'm rendering, this Id will always be available for the master page's hiding script. However, I'm concerned that this ViewModelBase can potentially grow in an uncontrolled fashion as number of such pieces of contextual info (like current language) will grow.. Any ideas?

    Read the article

  • Attempting to update multiple partial views from a single Ajax.ActionLink

    - by mwright
    I have a a partial view which contains other partial views. I am trying to the main partial view ( "MainPartialView" ) from an Ajax.ActionLink in a partial view contained by the main partial view ( "DetailsView" ). Everything appears to be called just fine and I can step through and it executes all of the code on the pages. However, after that is all done it throws this error in a popup box in visual studio: htmlfile: Unknown runtime error This error puts the break point in the MicrosoftAjax.js file, Line 5, Col 83,632, Ch 83632. Any thoughts? Index Page: <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script> <ul> <% foreach (DomainObject domainObject in Model) { %> <% Html.RenderPartial("MainPartialView", domainObject); %> <% } %> </ul> MainPartialView: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DomainObject>" %> <li> <div id="<%= Model.Id%>"> <%= Ajax.ActionLink("Details", "PartialViewAction", "PartialViewController", new { id = Model.Id, }, new AjaxOptions { UpdateTargetId ="UpdateTargetId" })%> <% Html.RenderPartial("Details", Model); %> <div id="Details"></div> </div> </li> Details: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DomainObject>" %> <% foreach ( var link in Model.Links) {%> <div> <div> <%= link.Name %> </div> <div> <%= Ajax.ActionLink("Submit this Action", "DoAction", "XTrademark", new { id = Model.TrademarkId, id2 = actionStateLink.ActionStateLinkId }, new AjaxOptions{ UpdateTargetId = Model.TrademarkId.ToString()} )%> </div> </div> <br /> <%} %>

    Read the article

  • Building a template to auto-scaffold Index views in ASP.NET MVC

    - by DanM
    I'm trying to write an auto-scaffolder for Index views. I'd like to be able to pass in a collection of models or view-models (e.g., IQueryable<MyViewModel>) and get back an HTML table that uses the DisplayName attribute for the headings (th elements) and Html.Display(propertyName) for the cells (td elements). Each row should correspond to one item in the collection. Here's what I have so far: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <% var items = (IQueryable<TestProj.ViewModels.TestViewModel>)Model; // Should be generic! var properties = items.First().GetMetadata().Properties .Where(pm => pm.ShowForDisplay && !ViewData.TemplateInfo.Visited(pm)); %> <table> <tr> <% foreach(var property in properties) { %> <th> <%= property.DisplayName %> </th> <% } %> </tr> <% foreach(var item in items) { %> <tr> <% foreach(var property in properties) { %> <td> <%= Html.Display(property.DisplayName) %> // This doesn't work! </td> <% } %> </tr> <% } %> </table> Two problems with this: I'd like it to be generic. So, I'd like to replace var items = (IQueryable<TestProj.ViewModels.TestViewModel>)Model; with var items = (IQueryable<T>)Model; or something to that effect. The <td> elements are not working because the Html in <%= Html.Display(property.DisplayName) %> contains the model for the view, which is a collection of items, not the item itself. Somehow, I need to obtain an HtmlHelper object whose Model property is the current item, but I'm not sure how to do that. How do I solve these two problems?

    Read the article

  • How to arrange models, views, controllers in a Kohana 3 project

    - by Pekka
    I'm looking at how to set up a mid-sized web application with Kohana 3. I have implemented MVC patterns in the past but never worked against a "formalized" MVC framework so I'm still getting my head around the terminology - toying around with basic examples, building views and templates, and so on. I'm progressing fairly well but I want to set up a real-world web project (one of my own that I've been planning for quite some time now) as a learning object. I learn best by example, but example-based documentation is a bit sparse for Kohana 3 right now - they say so themselves on the site. While I'm not worried about getting into the framework soon enough, I'm a bit concerned about arranging a healthily structured code base from the start - i.e. how to split up controllers, how to name them, and how to separate the functionality into the appropriate models. My application could, in its core, be described as a business directory with a main businesses table. Businesses can be listed by category and by street name. Each business has a detail page. Business owners can log in and edit their business's entry. Businesses can post offers into an offers table. I know this is not very detailed, but I don't want to cram too much information into this question. I'll be more than happy to go into more detail if needed. Supposing I have all the basic functionality worked out and in place already - list all businesses, edit business, list businesses by street name, create offer logged in as business, and so on, and I'm just looking for how to fit the functionality into a MVC pattern and into a Kohana application structure that can be easily extended: Do you know real-life, publicly accessible examples of "database-heavy" applications like directories, online communities... with a log-in area built on Kohana 3 where I could take a peek how they do it? Are there conventions or best practices on how to structure an extendable login area for end users in a Kohana project that is not only able to handle a business directory page, but further products on separate pages as well? Do you know application structuring HOWTOs or best practices for Kohana 3 not mentioned in the user guide and the inofficial Wiki? Have you built something similar and could give me some recommendations?

    Read the article

  • Arranging models, views, controllers in a Kohana 3 project

    - by Pekka
    I'm looking at how to set up a mid-sized web application with Kohana 3. I have implemented MVC patterns in the past but never worked against a "formalized" MVC framework so I'm still getting my head around the terminology - toying around with basic examples, building views and templates, and so on. I'm progressing fairly well but I want to set up a real-world web project (one of my own that I've been planning for quite some time now) as a learning object. I learn best by example, but example-based documentation is a bit sparse for Kohana 3 right now - they say so themselves on the site. While I'm not worried about getting into the framework soon enough, I'm a bit concerned about arranging a healthily structured code base from the start - i.e. how to split up controllers, how to name them, and how to separate the functionality into the appropriate models. My application could, in its core, be described as a business directory with a main businesses table. Businesses can be listed by category and by street name. Each business has a detail page. Business owners can log in and edit their business's entry. Businesses can post offers into an offers table. I know this is pretty vague, but I don't want to cram too much information into this question. I'll be more than happy to go into more detail if needed. Supposing I have all the basic functionality worked out and in place already - list all businesses, edit business, list businesses by street name, create offer, and so on, and I'm just looking for how to fit the functionality into a MVC pattern and into a Kohana application structure that can be easily extended: Do you know real-life, publicly accessible examples of "database-heavy" applications like directories, online communities... with a log-in area built on Kohana 3 where I could take a peek how they do it? Are there conventions or best practices on how to structure an extendable login area for end users in a Kohana project that is not only able to handle a business directory page, but further products on separate pages as well? Do you know application structuring HOWTOs or best practices for Kohana 3 not mentioned in the user guide and the inofficial Wiki? Have you built something similar and could give me some recommendations?

    Read the article

  • showing errors from actions in table-based views

    - by enashnash
    I have a view where I want to perform different actions on the items in each row in a table, similar to this (in, say, ~/Views/Thing/Manage.aspx): <table> <% foreach (thing in Model) { %> <tr> <td><%: thing.x %></td> <td> <% using (Html.BeginForm("SetEnabled", "Thing")) { %> <%: Html.Hidden("x", thing.x) %> <%: Html.Hidden("enable", !thing.Enabled) %> <input type="submit" value="<%: thing.Enabled ? "Disable" : "Enable" %>" /> <% } %> </td> <!-- more tds with similar action forms here, a few per table row --> </tr> <% } %> In my ThingController, I have functions similar to the following: public ActionResult Manage() { return View(ThingService.GetThings()); } [HttpPost] public ActionResult SetEnabled(string x, bool enable) { try { ThingService.SetEnabled(x, enable); } catch (Exception ex) { ModelState.AddModelError("", ex.Message); // I know this is wrong... } return RedirectToAction("Manage"); } In the most part, this is working fine. The problem is that if ThingService.SetEnabled throws an error, I want to be able to display the error at the top of the table. I've tried a few things with Html.ValidationSummary() in the page but I can't get it to work. Note that I don't want to send the user to a separate page to do this, and I'm trying to do it without using any javascript. Am I going about displaying my table in the best way? How do I get the errors displayed in the way I want them to? I will end up with perhaps 40 small forms on the page. This approach comes largely from this article, but it doesn't handle the errors in the way I need to. Any takers?

    Read the article

  • Auto-scaffolding Index views in ASP.NET MVC

    - by DanM
    I'm trying to write an auto-scaffolder for Index views. I'd like to be able to pass in a collection of models or view-models (e.g., IQueryable<MyViewModel>) and get back an HTML table that uses the DisplayName attribute for the headings (th elements) and Html.Display(propertyName) for the cells (td elements). Each row should correspond to one item in the collection. Here's what I have so far: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <% var items = (IQueryable<TestProj.ViewModels.TestViewModel>)Model; // Should be generic! var properties = items.First().GetMetadata().Properties .Where(pm => pm.ShowForDisplay && !ViewData.TemplateInfo.Visited(pm)); %> <table> <tr> <% foreach(var property in properties) { %> <th> <%= property.DisplayName %> </th> <% } %> </tr> <% foreach(var item in items) { %> <tr> <% foreach(var property in properties) { %> <td> <%= Html.Display(property.DisplayName) %> // This doesn't work! </td> <% } %> </tr> <% } %> </table> Two problems with this: I'd like it to be generic. So, I'd like to replace var items = (IQueryable<TestProj.ViewModels.TestViewModel>)Model; with var items = (IQueryable<T>)Model; or something to that effect. The <td> elements are not working because the Html in <%= Html.Display(property.DisplayName) %> contains the model for the view, which is a collection of items, not the item itself. Somehow, I need to obtain an HtmlHelper object whose Model property is the current item, but I'm not sure how to do that. How do I solve these two problems?

    Read the article

  • JSF 2.0: Preserving component state across multiple views

    - by tlind
    The web application I am developing using MyFaces 2.0.3 / PrimeFaces 2.2RC2 is divided into a content and a navigation area. In the navigation area, which is included into multiple pages using templating (i.e. <ui:define>), there are some widgets (e.g. a navigation tree, collapsible panels etc.) of which I want to preserve the component state across views. For example, let's say I am on the home page. When I navigate to a product details page by clicking on a product in the navigation tree, my Java code triggers a redirect using navigationHandler.handleNavigation(context, null, "/detailspage.jsf?faces-redirect=true") Another way of getting to that details page would be by directly clicking on a product teaser that is shown on the home page. The corresponding <h:link> would lead us to the details page. In both cases, the expansion state of my navigation tree (a PrimeFaces tree component) and my collapsible panels is lost. I understand this is because the redirect / h:link results in the creation of a new view. What is the best way of dealing with this? I am already using MyFaces Orchestra in my project along with its conversation scope, but I am not sure if this is of any help here (since I'd have to bind the expansion/collapsed state of the widgets to a backing bean... but as far as I know, this is not possible). Is there a way of telling JSF which component states to propagate to the next view, assuming that the same component exists in that view? I guess I could need a pointer into the right direction here. Thanks! Update 1: I just tried binding the panels and the tree to a session-scoped bean, but this seems to have no effect. Also, I guess I would have to bind all child components (if any) manually, so this doesn't seem like the way to go. Update 2: Binding UI components to non-request scoped beans is not a good idea (see link I posted in a comment below). If there is no easier approach, I might have to proceed as follows: When a panel is collapsed or the tree is expanded, save the current state in a session-scoped backing bean (!= the UI component itself) The components' states are stored in a map. The map key is the component's (hopefully) unique, relative ID. I cannot use the whole absolute component path here, since the IDs of the parent naming containers might change if the view changes, assuming these IDs are generated programmatically. As soon as a new view gets constructed, retrieve the components' states from the map and apply them to the components. For example, in case of the panels, I can set the collapsed attribute to a value retrieved from my session-scoped backing bean.

    Read the article

  • jQuery issue - #<an Object> has no method

    - by Shaun
    I've tried a veriety of jQuery plugins recently and I keep getting this error … … regardless of what plugin I try to use. I've checked the links to the JS files which are all there and working fine. I'm using Drupal if that makes any difference. I've run the plugins away from the main site to demonstrate that they are working and that I am doing things right with 100% success. Any ideas? Update: My jQuery file called in the footer: $(document).ready(function() { $('#footer_holder').hide(); // Fancy Box $("a.fancybox").fancybox({ 'hideOnContentClick': true, 'titlePosition' : 'over', 'transitionIn' : 'elastic', 'transitionOut' : 'elastic', 'speedIn' : 600, 'speedOut' : 200, 'overlayShow' : false, }); $("#homepage_slider").easySlider({ auto: true, continuous: true, }); }); *note - fancy box works fine. jQuery is sorted out by Drupal. I'm running version 1.4

    Read the article

  • Alternative to pjax/djax and ajaxy

    - by elluca
    I was evaluating jQuery plugins to make a Drupal 7 site using AJAX everywhere. I have been using ajaxy. But it does not seem to be very actively maintained. Two possible solutions I have found are pjax and djax. What are your experiences with those plugins? What other plugins do you know that do similar functionality? Very important features are SEO friendliness (preferably using pushState so no hash is being used. Hashes are used as a fallback for not supported browsers.). And also has to be very flexible since it has to wirk with Drupal's HTML structure.

    Read the article

  • joomla: editing the mvc package for joomla component development

    - by PROFESSOR
    hi! i m new to joomla component development i hv just downloaded bunch of files from some jooomla mvc generater website.which llok like smthng like this hello.xml - frontend/index.html - frontend/hello.php - frontend/controller.php - frontend/models/index.html - frontend/models/hello.php - frontend/views/index.html - frontend/views/hello/index.html - frontend/views/hello/view.html.php - frontend/views/hello/metadata.xml - frontend/views/hello/tmpl/index.html - frontend/views/hello/tmpl/default.php - frontend/views/hello/tmpl/default.xml - frontend/assets/index.html - frontend/assets/images/index.html - backend/index.html - backend/admin.hello.php - backend/controller.php - backend/CHANGELOG.php - backend/views/index.html - backend/views/hello/index.html - backend/views/hello/view.html.php - backend/views/hello/tmpl/index.html - backend/views/hello/tmpl/default.php - backend/models/index.html - backend/models/hello.php - backend/assets/index.html - backend/assets/images/index.html - languages-front/en-GB/en-GB.com_hello.ini - languages-admin/en-GB/en-GB.com_hello.ini MVC Generator version 1.0.5 but dont know how to edit and where to edit those files pls help i m trying to make my only php based application to a joomla component

    Read the article

  • Aliasing a route causes rails to expect paths that don't exist

    - by DJTripleThreat
    ok here's some code: prompt>rails my_app prompt>cd my_app prompt>script/generate scaffold service_type title:string time_allotment:integer prompt>rake db:migrate then edit these files to look like this: #routes.rb: ActionController::Routing::Routes.draw do |map| map.resources :services, :controller => :service_types map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end which produces these routes: prompt>rake routes services GET /services(.:format) {:controller=>"service_types", :action=>"index"} POST /services(.:format) {:controller=>"service_types", :action=>"create"} new_service GET /services/new(.:format) {:controller=>"service_types", :action=>"new"} edit_service GET /services/:id/edit(.:format) {:controller=>"service_types", :action=>"edit"} service GET /services/:id(.:format) {:controller=>"service_types", :action=>"show"} PUT /services/:id(.:format) {:controller=>"service_types", :action=>"update"} DELETE /services/:id(.:format) {:controller=>"service_types", :action=>"destroy"} /:controller/:action/:id /:controller/:action/:id(.:format) _ #my_app/app/views/service_types/index.html.erb <h1>Listing service_types</h1> <table> <tr> <th>Title</th> <th>Time allotment</th> </tr> <% @service_types.each do |service_type| %> <tr> <td><%=h service_type.title %></td> <td><%=h service_type.time_allotment %></td> <td><%= link_to 'Show', service_type %></td> <td><%= link_to 'Edit', edit_service_path(service_type) %></td> <td><%= link_to 'Destroy', service_type, :confirm => 'Are you sure?', :method => :delete %></td> </tr> <% end %> </table> <br /> <%= link_to 'New service_type', new_service_path %> - #my_app/app/views/service_types/new.html.erb <h1>New service_type</h1> <% form_for(@service_type) do |f| %> <%= f.error_messages %> <p> <%= f.label :title %><br /> <%= f.text_field :title %> </p> <p> <%= f.label :time_allotment %><br /> <%= f.text_field :time_allotment %> </p> <p> <%= f.submit 'Create' %> </p> <% end %> <%= link_to 'Back', services_path %> when you try to access http://localhost:3000/services/new you get the following error: undefined method `service_types_path' for #<ActionView::Base:0xb7199a80> Extracted source (around line #3): 1: <h1>New service_type</h1> 2: 3: <% form_for(@service_type) do |f| %> 4: <%= f.error_messages %> 5: 6: <p> Application Trace: /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/polymorphic_routes.rb:107:in `__send__' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/polymorphic_routes.rb:107:in `polymorphic_url' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/polymorphic_routes.rb:114:in `polymorphic_path' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/form_helper.rb:298:in `apply_form_for_options!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/form_helper.rb:277:in `form_for' /home/aaron/NetBeansProjects/my_app/app/views/service_types/new.html.erb:3:in `_run_erb_app47views47service_types47new46html46erb' /home/aaron/NetBeansProjects/my_app/app/controllers/service_types_controller.rb:29:in `new' Anyone have any idea why it believes that service_types_path is in my code when it's not?

    Read the article

  • php cpanel

    - by Miguel Ping
    I have a php account with my provider, and I also have cpanel installed for me. I currently have two drupal sites there, let's called the main myMainSite and another one under construction called myNewSite. So when I go to www.myMainSite.com, I go to the main site. When I go to myNewSite.myMainSite.com, i go to the drupal site that is under construction. My question is, when my under construction site goes live, I want that all users that go to www.myMainSite.com see the new site (the one that is under myNewSite.myMainSite.com). How can I accomplish this with cpanel? is it within the "addon domains" configuration? I don't want a redirect that changes the address bar, ie, I want to keep the original url.

    Read the article

  • AJAX jQuery click results in function event being fired twice

    - by pmagunia
    I have an AJAX chat room module in Drupal and I am trying to insert BBCode stlye tex tags to the submit box when the user clicks Insert Tex. I managed to get the following code to work the first time but afterwards when I click Insert Tex it inserts the tex tags triple times. $('#edit-chatroom-message-entry-submit').click(function (e) { e.preventDefault(); e.stopPropagation(); if ($('#edit-chatroom-message-entry-box').val()){ Drupal.chatroom.postMessage($('#edit-chatroom-message-entry-box').val()); $('#edit-chatroom-message-entry-box').val('').focus(); } }); $('#edit-chatroom-tex-submit').click(function (e) { e.preventDefault(); e.stopPropagation(); $('#edit-chatroom-message-entry-box').val($('#edit-chatroom-message-entry-box').val() + '[tex][/tex]'); }); I would appreciate it if a suggestion could be make to make the code work properly.

    Read the article

  • jCarousel Lite - center images horizontally and vertically

    - by carillonator
    I have jCarousel Lite going in Drupal with images of various sizes/aspect ratios. I'm not having much luck trying to center the images vertically and horizontally (i.e. evenly-spaced). The plugin requires that the images be in a <ul><li><img ... /></li></ul>. I've tried display:inline-block, marginTop:50% among other things, most of which just screw up the carousel. The carousel is posted at: http://carillontech.org/drupal/ thanks!!

    Read the article

  • arg function not using URL alias

    - by cinqoTimo
    I am running Drupal 6, and I'm using PHP for block visibility. <?php $city = arg(0); $page = arg(1); if ($city == 'tampa' && $page != 'art'){ return 'TRUE'; } else{ return FALSE; } ?> I was having trouble with this block of code, so I decided to insert: <?php print arg(0).arg(1); ?> in my page.tpl.php. What I found was that on some of my pages, arg(0) was showing 'node' when the URL is actually 'tampa', and of course, arg(1) is showing the node ID. However, on other pages, such as my calendar, arg(0) is actually showing 'tampa' instead of 'node'. I have used this a lot in the past, and have never had this problem. Is there a reason why Drupal is disregarding my aliases on certain pages? If so, how can I fix it?

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >