Setting up the path in view in drupal 7 - view

I have a taxonomy menu inside a mega menu in drupal7. I have created a view for a primary link let say technology.
the url alias which i setted for the technology menu is http://localhost/drupal/technology
the technology have a secondary menu as security which has url alias as http://localhost/drupal/technology/security and security contains the sub menu as car with url alias as http://localhost/drupal/technology/security/car .
I want a view to display in way that the technology page should contain all the article of securtiy and as well as car.
same way the security has to contain the article related to security as well as car.
The view which i created looks like as follows.
Can any one help me how to set the path for technology and for it sub menus .. I do no whether the CONTEXTUAL FILTERS i setted is correct or not. I i go to technology page i am not able to see the view which i created is getting affected.

You just have to set the path to Drupal core's default for taxonomies taxonomy/term/%
The problem is that your view will replace all terms pages without being restricted to a given Vocabulary. If you need different Views for different Vocabularies you will have to take a look at Taxonomy Views Integrator or Taxonomy Views Switcher

Related

How to make "events" using "eventnews" extension

I am using this extension with TYPO3 v10 https://extensions.typo3.org/extension/eventnews/ I created a news content and marked it as "Is event" set the dates, simple organizer name and location.
But this is what I am seeing on the frontend. it doesn't look like an event to me but similar to the news. Can anybody direct me in a way how can I create an "event"?
Basically this is what you get, as the eventnews extension does simply that: It allows news entries to be created as "events" (some additional fields). So at first you get the same views you also have with news, but some additional fields.
One additional new view you can include in your page is the "month view".
Refer to the documentation of eventnews.
To add a Month View, you could do that by simply adding a plugin to your content:
All other things you might need are already there in news (filtering, searching, etc), and customization can be done using templates.
If you need further "event-like" features (like registration, recurring events etc), this might not be the right extension. Try for example EXT:cal or EXT:seminars.

How to integrate Magnolia CMS with Spring app in limited range

I have a question to Magnolia CMS (integrated with Spring) users.
I have to write e-shop integrated with CMS where we can divide all pages into two categories:
Edited and added by admin
static pages like user account settings, shopping cart etc.
First ones, must be totally customizable by admin - I mean, admin must be able to create his own template, add text areas or graphics/video whenever he wants. He also must be able ( this is very important) to create new products which must be also stored in db to be accessible for the application code ( to fill the products list by myself in the code or to set the prices on the static admin pages).
So user can add as many products as he would like, create separate template for some of them and I have to be able to search for this products in db ( for example when user try to use search criteria). The search panel must be created by me - but where admin will place it is up to him.
The second type of pages are static pages done in JSP and I do not expect to change it using CMS.
As the second type of pages is of course not a problem, I do not know what CMS solution I should use for first type of pages.
I thought about Magnolia CMS, but as I can see all templates must be created by programmer in the code.
Also I'm not sure if it's possible to implement mechanism to maintain products ( inside the e-shop) - from one hand admin must be able to add templates for them in CMS, but I must be able to access them from the code ( to maintain them at shopping cart, make invoice etc). The product prices are set from admin panel ( static pages) as well- not from CMS of course. Maybe I can add any single product at the static pages ( insert it into the db) and somehow connect CMS page with it ?
I also need to add that main page template must be designed by HTML designer, so perhaps it would be plain HTML and this main template would be updated due to the admin needs in CMS.
Cloud anybody please advice me the best CMS solution where I can achieve all this ?
Best Regards
I've seen fair number of shops implemented that way with Magnolia where you use spring & web flow to manage a shopping cart and checkout process, while letting editors to create & customise products & categories & promos available in the shop.
You can also get similar (w/o spring) integration just by installing shop module of Magnolia. It's product and product category management might come in handy even if you were to replace checkout by your own.
To answer the other questions and stipulations
you can write your templates in ftl and models in groovy and have those hosted inside of the repository, thus giving access to them to editor and allowing her to change whatever needs to be changed. However there is also danger in that since templates are responsible for generating html, editor might be able to break html layout by making changes directly to the templates. While you want editor to create new products and modify existing ones, Magnolia lets you separate template of products from the content of products so you can let editor to edit just all the fields that you deem editable for given product without having her to ever access html or ftl directly.
as you mention, html will come from designer, so what you pbly want is to take that html, break it into functional blocks that repeat in multiple pages, save it as ftl templates and replace sample text in there with FM tags to retrieve such data from Magnolia. Actually, even better, download the STK static prototype and hand it over to your graphic designer. Tell her to create design by changing css/js/images only, but not to change structure of the html itself in the prototype, then you can truly just drop in css/js/img provided back to you by the designer.
regarding static pages - you can always serve them from Magnolia even if you don't expect anyone to ever edit them (since it usually happens sooner or later that someone wants to edit them) or you can simply configure bypass for the url for such pages and have Magnolia ignore them so they can be served by underlying application server container
to bring in Spring based application, you might consider looking in more details at and using Magnolia's Blossom module which will in turn let you annotate your spring controllers to be treated as Magnolia templates to make integration even more simple.
HTH, Jan

Codeigniter - a dynamic sidebar

I only started with this a couple of days ago, so this may be a silly question...
I have an admin area with its own directory "admin" within the controller folder. So if the user is in the admin area, I want a sidebar to show. But obviously there will be a fair few "pages" (controllers) within the admin area. I have Clients, Services and Dashboard.
In the sidebar (on all pages) I want a list of clients and services so when clicked, it goes to a page and display info for that client/service.
I sort of have it working with add_service(), edit_service(), view_services() etc... but in each of these methods, it seems like I need to load services AND clients models, and pass the data back to each view... in all methods? So if I want to add a service, I click "add service" and it takes me to the add_service(). Do I need the below 4 lines in each method?
$this->load->model('client_model');
$this->load->model('services_model');
$data['clients'] = $this->client_model->get_clients();
$data['services'] = $this->services_model->get_services();
I have read about widgets, but not sure if that's what I need exactly.
Thanks
As you read, all you need is HMVC. This will create a "widget" with your controller, model and views, and you'll be able of calling "a whole": A part of the website wich manage its own part.
One solution is implement https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc into your code, you create a module called "client", and in your "admin" controller you call it. You'll get your client table there, and in your controller "client" you'll be able of call it too, and you'll have exactly the same behaviour. I've implemented wiredesignz HMVC quite times and I think is the solution for your trouble. Anyway, you could also check https://github.com/Bigwebmaster/codeigniter-modular-extensions-hmvc, which is a fork with improvements into the code.
About your sidebar, you'll have to call the widget you'll create with your clients, and you'll have it quickly with only one call, because the module will manage all the behaviour

The right way to create subdomains for different user and seo friendly subdomains

I want to build a website with asp.net mvc3 and entity framework which user can login and make their own store under a subdomain.
There is two way that i can do that:
the first one is to create only one view page and based on the user fill the page with appropriate style and content from the database and use url rewriting to fix the url. so for example if my website name is example.com a user can login and create a subdomain like user1.example.com which then there are some pages like user1.examples.com/add , user1.examples.com/shoppingCart/Checkout ,...
or
The second way is that I can create different views and controllers and based on the user fill the views withe appropriate content and style.
the number of the pages under different subdomains are the same and even the name. For examples two different users like user1.example.com and user2.example.com both have
user1.example.com/shoppingcart and user2.example.com/shoppingcart and so on.
Which way is the right way and is there any other ways to build this website?
which one is more seo friendly?
I would create a user-themed layout where you can configure the design based on the chosen store.
You could make a route that basically takes the store name as an "id" and then load the design settings from the database.
Replicating views for each store sounds painful and unnecessary, plus a maintenance nightmare.

How to use multiple themes at the same time

I'm looking for a way to use multiple themes in one XPages application, each theme active in a different section of the application. For instance to support an single .nsf application with both a public facing website (custom theme) and a CMS with a OneUI theme.
You can set which theme is used through the whole application on the XPage Properties tab in Application Properties. It's also possible to change the theme for a user's session with this code:
context.setSessionProperty("xsp.theme", <theme_id>)
But both options set the theme for all pages in the current .nsf, and I'm looking for a way to specify theme X for one part of the application and theme Y for a second part.
Is this possible?
On any page that should use an alternate theme, use the following syntax to apply the property directly to the view root:
<xp:view>
<xp:this.properties>
<xp:parameter name="xsp.theme" value="alternateThemeName" />
</xp:this.properties>
</xp:view>
I tried all of the above, but none of them worked for me. But I found a solution:
Paste this into the view's beforeRenderResponse event:
context.setSessionProperty("xsp.theme", "yourAlternateThemeName")
There is one issue: once you have used this way you have to use it always and on every page as this sets a session property which is stored as long as you are logged in.
Just talked with colleague Tony Mcguckin.
You can change the theme per page. Under all properties of the XPage select data-properties and create a new property with name "xsp.theme" and value "yourThemeName".
While I like the idea of having page-specific themes, based on the specific use case you're describing, the "right" way to do this is to have two separate XPage applications bound to the same back end data store. Not only does this make it simple to specify a different theme for each, it also simplifies the ACL (assuming you'll have different people accessing the public site vs. the CMS), makes it easier to tune performance by having different settings per application, and even without having application-specific settings, should improve performance slightly just because of Java class loader behavior: each NSF acts as a distinct ClassLoader, and each XPage or Custom Control in your NSF results in the storage of a separate class file. So, in theory, if the features of your public site require you to create 5 XPages and the CMS features span 10 XPages, simply splitting these into two separate apps makes it easier for the class loader to retrieve the class for any page a user loads, because it doesn't have to ignore the classes it will never need for that user just to find the one class it does need at the time. So I'm still tempted to find a way to get page-specific themes working just for the "cool" factor of it, but for this specific purpose, I'd recommend using two different applications entirely, with a different theme assigned to each.
I dont know that much about themes but cant you check in your theme (with some ssjs) at which viewroot ( by id? ) you are and according to that include the correct styles , css and other resources?

Resources