Processwire Holder/Page implementation - processwire

How do you implement a holder/page pattern in Processwire. The idea is simple. One page type manages the list view, and usually contains very little native content. The primary function of this page is to provide a list of its child pages, providing a brief summary for each one, along with a link to its detail view. A second page type will represent the detail view for any given child page, which will typically have a custom template and content fields that make up its identity. Think of it think like a news listings, image galleries, even a Twitter timeline.

I can give examples for two different methods from a recent site I built with Processwire.
First is NEWS section:
I have a page called News and it's template is news-listing. Under News, I have news pages and their template is news-detail. news-listing template only accepts news-detail and news-listing for child pages. I allowed news-listing under news-listing if client needs to create sub listing pages under news.
News-listing template basically gets the news with
<?php $news = $page->children('template=news-detail'); ?>
Second is Products section
Site has different section for purposes. Like WOMENS, MENS, KIDS etc. The products are not shared among those main separation. I have a structure like below
MAIN SEPARATION
Products (products are listed under)
Categories (categories are listed under)
On product details page you can select multiple categories. On categories page products are listed like this. And on main separation page I have categories listed. Each of these page type has their own templates.
$products = $page->rootParent->find("template=product-detail,category={$page->id}");
Hope it helps

Just create pages under parent page then iterate on children pages. Processwire is slow though, better use Silverstripe it's more responsive.

Related

Joomla News on Several Pages

I'm currently working on a project in my school and I have to create three websites with Joomla. So this would be an entry page displaying only 2 pictures which link to the next two pages. Then one page for each section of the school as a sublevel domain. Like electronics.school.at and mechatronic.school.at. My problem is now, that I have to implement a news section on the main domain school.at that shows news from electronics.school.at and mechatronic.school.at combined and on every page mentioned above, I also have to implement a news page but this one should only implement their news.
So this will be 3 seperate Joomla pages but the first one should combine the news from the next 2.
I hope somebody can help me here.
Do it via newsfeeds. You can display the feeds on other Domains/joomlas. Link to the joomla feed of startpage or categories (for example: http://www.domain.de/rss-feed.feed?type=rss) and display the items with joomlas feed rendering module.

Display Featured Article of Specific Category Using a Module in Joomla

I am working with different modules in Joomla (2.5) in order to display a variety of things. Right now I am trying to show the featured article of a specific category.
For example: I have three different pages, all showing articles specified by its own category.
Bikes
Gears
Media
Each of these pages has a range of article (lets says 20 each). Each of these sets of articles has a featured article. So there is a featured article for Bikes, Gears and Media.
My problem is trying to get this featured article to display at the top of each main page. I've tried using the Articles by Category module and I've looked into the Article - Newsflash module as well as looking at the code of the front page where a "featured article" typically appears.
Does anyone have any suggestions for a module I may be able to use?
No module needed. Here are two ways you can accomplish this:
In the Blog Layout Options for your Category Blog menu item, set Article Order to Featured Articles Order.
Alternatively, make a new parent category for each existing category and put the featured article in the parent. Set your blog page to show the parent category and the subcategories. Hide the subcategory headings on the page with menu item settings and/or CSS.

Setup multiple Magento designs on single website

I'm setting up a Magento site and have some design requirements that we can't quite get right. What is the best way to setup for the website, store, store view and then the categories for the needs below?
Overview:
One domain name, one set of customers
3 similar product lines that appeal to different industries
Specific Requirements:
The home page should show static content about the company and featured products from all three main categories of products
Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Home Page: Design A, any and all products may show.
Category 1: Design 1, products only from cat 1 show
Category 2: Design 2, products only from cat 2 show
Category 3: Design 3, products only from cat 3 show
Every combination of websites and stores and store views that we have tried results in strange behavior like changing a store and getting "There was no Home CMS page configured or found." instead of seeing the unique design and category it should be showing. So far we can only get the designs to be different by making new CMS pages which doesn't seem practical.
This seems like something that Magento is made to do and I have to be missing something.
Thank you for any help.
-Shane
Your design needs imply work and considerations from multiple areas of configuration. I'll tackle them in turn. The tl;dr is that there may be more than one way to accomplish what you want, with the number of options at your disposal depending on your needs.
1) One domain name, one set of customers
Domain names (URLs) are configurable for all configuration scopes: Global (aka "Default"), Website, and Store (aka "Store View"). Ultimately, Magento configuration comes down to the most granular/specific scope, which is the store ("Store View") scope. If a configuration value is not specified at the store scope, its value is derived (inherited) from the website or global scope.
Customers are configured to "belong" to all websites or to an individual website (System > Configuration > Customer Configuration: Account Sharing Options). There is no out-of-box capability to restrict customers to a particular store.
2) 3 similar product lines that appeal to different industries
Depends on things discussed below.
1) The home page should show static content about the company and featured products from all three main categories of products
Assuming that you are using the standard configuration of having the Mage_Cms module serve up the home page (System > Web > Default Pages), that CMS page should be visible for all store views. CMS blocks and pages are restricted based on store. Now, later on in your post you mention that you see different behavior in the home page "instead of seeing the unique design and category it should be showing", which indicates that you would like to have different but analogous content for each store's home page. You can use one homepage to do this, but rather than specify content in the content area, you'll need to include your content by specifying a block in Layout XML Update - this block will load a particular category based on the store.
2) Each main category of products should have a distinct visual design that carries through when looking at any of the products in those categories
Establishing theme variants from global scope is possible at the website- and store-wide scopes. Theme variants can also be specified per CMS page, product, and category [each entity having a tab in its admin panel for effecting this change], with the latter having the option of "waterfalling" its custom theme settings to "child" categories and products. Which approach you take depends on your catalog hierarchy as well as the variations present in your themes.
It should be noted that if you need to present different category structure, or if you need to enable/disable products differently based on context, then you will be dealing with multiple websites. This is because category structure relies on root categories, and only websites are associated with root categories. As a reminder, "websites" in Magento have no implicit connection to distinct URLs, it's just an unfortunate naming convention for a scope level.
3) It should be seamless for customers to move from one category of products to another and have the design change without having to choose a store from a dropdown etc.
Based on this final stated requirement, and assuming that you are relying on Magento's native navigation, you are locked into one category structure, and will be using the approach of waterfalling category design, which you will set for each top-level main category under your single root using the "Custom Design" tab:
Another approach would be to create three distinct websites with distinct root categories and then build a menu by hand which links to each of the three stores, but I think this is less ideal based on your stated needs. You could also use one root category and then hide categories by website. Again, less likely that this will be appropriate for you.
Based on the information above you might end up clarifying or adding to your question. I'll update my answer in response if necessary.

In Magento, how can I organize products from different categories under a parent entity which in turn has it's own attributes?

The actual use case is similar to a multi-vendor implementation in that the store should display products from many different vendors, but each one only requires it's own landing page (not a problem), and to have some vendor attributes, like address, accessible easily from the products.
No back-end interface or access control is required for the individual vendor.
Categories with custom attributes would have worked except that then a single vendor could only exist under one category, and not several.
How feasible is it to build a new content type into the Magento system to handle this?
I'm interested to hear any ideas. Thanks!
A product can be assigned to more than one category. You could have special 'vendor' categories that list their respective products and have their "Include in menu" setting to false. It is then possible to link to their URL as a landing page without them showing the normal menu.

Creating a Magento Sitemap page

I want to create a sitemap page for Magento that will display all the static pages in an orderly fashion. This page is going to be similar to http://www.magentocommerce.com/sitemap/ Has anyone created a Magento Extension or can someone point me in the right direction? Searching for this feature has been a nightmare since all I get are Google SEO results.
Edit: I would like to add some of the static pages to the site map. Currently the default sitemap has two options: Categories and Products. I would like a way to set which of my static pages can be added to the site map. Right now what I have done is just created a static page which I populated with links to my pages and products. However, if the client decides to add new products, it would require that page to be edited.
CMS > Pages > Manage Hierarchy
Bellow "Add node" button You can set CMS hierarchy with position.
$collection = Mage::getModel('enterprise_cms/hierarchy_node')->load("root_node_id");
"root_node_id" is parent of Your "Sitemap".
Create tree from $collection.
Also You can see enterprise_cms_hierarchy_node table, you can use columns as atributes from there to position elements inside Your tree.

Resources