I have created a k2 category of say trainers. I have then created K2 items and linked them to the trainer category. The k2 items are bios. A picture and blurb of text.
All is well.
Now I have an "article" say about Physical Rehab. This is a K2 item linked to it's respective category. At the end of the "article" I want to embed / link a specific trainer bio rather than retype everything. Further if I make a correction it propegates.
Now when I say article above I don't think I am using the term in the Joomla context accurately.
I say this because my Google search terms led me to Article Anywhere plugin. I installed it thinking I had this beat....only it didn't work. When I went to embed a bio it wasn't there. Hardly anything was and I suspect this is due to my K2 items not being "articles"
So I'm not so worried about the plug-in as much as how can I go about linking, chaining, embedding etc. my k2 items so I don't have a bunch of repetitive code?
Thank You
When referring to content in Joomla:
Items = article in K2
Articles = articles in Joomla com_content
When you use an extension that refers to articles, they mean the built in Joomla com_content. Articles Anywhere doesn't pull data from K2 items.
You probably need this - http://extensions.joomla.org/extensions/extension-specific/k2-extensions/19641
Related
I am creating a Sitecore MVC site for a client and I need to create page that will list news articles for the company.
So far, I have created items that use a shared data template called “Article,” and I also have a sublayout (a view rendering) called “Article” that will display these items.
For the list itself, my plan was to create another component (a sublayout) call “News_List”, and to put a placeholder in it called “List”.
My question is this: can I allow the author to insert articles (e.g., N items of type “Article”) into this placeholder via the page editor?
Will SC allow you to insert multiple instances of the same component into a placeholder? Will this break anything?
I believe this is a pretty common question but I have not found a definitive answer. Thanks in advance…!
You can insert as many components (of the same type) in your placeholder as you want.. Just make sure to put the placeholder settings correctly and give it a decent name (not just "list" ;))
But are you sure you want to do this? Your editors will manually need to create a list of components for each article they want to add on the page. Doesn't sound to be very user (editor) friendly.. Maybe you should consider creating a list component that can get a list of articles as a datasource and show those. Or even select them automatically (but that might be not according to your business case)..
Yes, authors can add multiple instances of the same component into a single placeholder.
Assuming that the code of the component doesn't do any stupid things it's absolutely ok to do this.
I'm working on a webshop using OpenCart2.x. I would like to add category while I'm adding product and assign product to that category.
Just to clarify... Let's say I want to add "HTC One" to category "Android". I would like to go to Catalog > Product > Add Product, enter "HTC One" details and
if category "Android" dosen't exist OC should offer to create new category.
It is possible in wordpress/woocommerce so I hope it is possible in OC2.
Sorry if the question is not for this site.
Thank you!
No, this is unfortunately not possible in vanilla OpenCart. However, I did find somewhat of a trick to make this process a tad bit more convenient.
If you open your OpenCart admin panel in 2 different browser instances that use different sets of cookies (different browser or incognito/no cookie mode) you can make your categories in one instance and then the category auto complete list in your product creation page will instantly update. Not exactly the desired functionality but definitely better than having to switch back and forth.
I'm trying to understand the best approach to create article items in my sitecore 7.2 project.
Basically I'm considering 2 options:
1 - Create an article as a page;
2 - Create an article as a Site Data Item.
1 - Create article pages under a given page (i.e. My Articles). This way each article would have a specific URL out of the box, easier to understand in Content Authors' point of view;
2 - Have a specific folder (i.e. Article Folder) under Site Data. This way we don't need to have a page for each article - I was thinking to have a single Article page that would render the article fields. However this would require more work in terms of URLs, navigation, etc.
Is there any other ideas? Am I missing something? I was also having a look at Buckets...
Thank you
I'm going to disagree with Marek and recommend you opt for option 2.
Storing your articles in folder under a Data node allows those items to be datasourced. This is the principle Sitecore was built on. You can then surface those articles in a number of interesting ways via Widgets such as Promo Panels, prompting the user to click through to read about the article without duplicating its data and requiring Content Editors to manage data multiple times.
It even supports multiple sites, so the Articles can be used in other sites you may add to your Sitecore instance in the future.
As you state it will require extra work in terms of Urls and Navigation but it can be achieved via Sitecore's Wild Card Item and you an even use a great open sourced Module from Sitecore's Marketplace to complete 90% of the work for you. See links below for more information.
You can still implement Marek's point of applying Presentation Details once on the Standard Values of the Wild Cart Item you create. If you are using Sitecore 7 and above you can store all your articles in a Bucket so if you have lots of articles they are stored and searchable in a meaningful way.
http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2011/09/wildcards-and-data-driven-urls.aspx
https://marketplace.sitecore.net/en/Modules/Wildcard_module.aspx
In a standard one instance setup the easiest implementation is to create articles as pages.
In Sitecore you want to limit the items in a folder to 100 or less which is best practice to keep the content editors experience optimal.
This then leads you needing a folder structure and a couple options:
Manually maintain a folder structure for your articles. For example articles/year/month/day. This gives your editors the most control over the folder structure and allow them to navigate the articles in a more traditional way via a visible folder structure.
Use a bucket which automatically generates the folder structure and hides this complexity from the content editor. This takes the manual folder creation and maintenance away from the content editor and are automatically generated based on the configuration you set out for your bucket. The folders wont be visible to the content editor so they will be forced to search in the bucket for any articles rather then navigate the folders.
Use the shared source News mover module (https://marketplace.sitecore.net/en/Modules/News_mover.aspx). This takes a different approach to the above. It works via a traditional folder structure however it generates folders and moves the item on save based on the date field in the article. So the news mover handles the generation of folders however you will still need to check your not exceeding 100 items per folder again for performance when opening folders with large amounts of items.
With all solutions you must still consider the URLs for your articles as they will include the folder structure by default. This is not always acceptable. I prefer to remove the folder structure from the URL. For this you need to create a custom linkProvider and a custom HttpRequestProcessor. Firstly the linkprovider allows you to ensure the new URL is always created and displayed in your site as you want. Next the HttpRequestProcessor ensures that when navigating to the shortened URL Sitecore recognises it as a valid URL and presents the correct page.
By excluding the folder structure from the URL it also adds the additional benefit that the URL is not dependent on the structure. This means editors can change that folder structure and not need to create redirect items to ensure SEO rankings or users bookmarks are not lost.
The cleaner data model is to use the wildcard approach for the URLs and centralize the storage of articles data in a bucket of datasources. This will give you optimum performance and reuse of the data.
However, this isn't how an author thinks about their website. When they use the system, they tend to navigate to the area where they would view articles and try to create a new one there. Authors tend to think in 'pages', so try to hide whatever data model you are using from them and give them the ability to edit the page with Experience Editor.
Some developers try to optimize too far and forget that the authoring experience is likely the most important piece of the delivered solution. The author doesn't care how efficiently you stored the data, only that they can edit it easily and publish efficiently. Whatever model supports that for your author base is how you should implement it.
My recommendation is a page-based approach where the author creates the URL structure with folders and items, something they understand. Then, if you really need to, you can have the primary article data be a datasource-driven component on the page. The user gets to use all the tools they are familiar with (Experience Editor,preview navigation) but you can still store the raw data in a centralized folder. You could then theoretically swap out the article data using DMS rules, or hide information based on authentication or membership status.
Go with approach 1: article is a page.
Define all your presentation details on Article Page template __Standard Values. All new articles will get them. And you can change some of the presentation details for your chosen articles if you want.
If you know that you'll have lot of articles, think about year/month/day folder structure, e.g. articles/2015/06/12.
Approach 2 doesn't give you anything - you still need to have an item for every article. And as you wrote, it would require additional coding which is not required.
I have this content tree:
SiteA
- Home
- Articles
SiteB
- Home
- News
Repository
- article1
- article2
- article3
- ...
- article1000
Is there a way I can pull any article from the Repository Item and display it dynamically on the SiteA/Article Item? Same I would do with SiteB/News.
Additional Question:
Is it possible to inherit the layout of each article from the parent Item Repository? The articles will be added via migration(which I would be working on next) it would take too much time reassigning layouts once the items has been migrated.
Yes, there is. There's a couple different things you can do, depending on your requirements.
For instance, you can have a MultilistField on your SiteA/Article item, which enables you to select articles from the Repository item. By setting the Datasource field for the MultilistField to /sitecore/content/Repository you'll be able to select any or all.
However, that's probably not what you want, since you might have thousands of articles looking at your article names.
Another option is creating a sublayout / rendering that reads the latest X articles from the Repository item. With a simple for loop you could then do something like:
var list = new List<Item>();
var repoItem = Sitecore.Context.Database.GetItem("/sitecore/content/Repository");
for (int i = 0; i < 5; i++)
{
list.Add(repoItem[i]);
}
Which you could set as a DataSource to an asp:Repeater. Of course, you could do it in many different ways (select the number of child items through some lambda expression, use Lucene to get the items if you also want to use keywords etc.).
You can also have the number of items defined somewhere in Sitecore, so it could be different for SiteB/News and SiteA/Article.
Looking at your question I can imagine you to eventually choose for an option like introducing Wildcard Items to present the data from your repository on those different locations. there is an interesting module available on the Marketplace.sitecore.net, have a look at that too before deciding what you want to do.
Reading your last line: I can pull any article from Repository/ Item and display it dynamically I would strongly suggest you to go for a wildcard solution.
Another option, is to use Sitecore Clones (from Sitecore 6.4) or Proxies (older than Sitecore 6.4).
Clones: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/10/Sitecore-CMS-6-4-Cloning.aspx
Proxies:
http://sdn.sitecore.net/Articles/Administration/Using%20Proxy%20Items%20in%205,-d-,3.aspx
Caveat Emptor: Turning on proxies and using them will affect performance. I think it works like this:
- each time it has to get items/children it looks in the Proxy table to see if any additional items should be added
- the more proxies there are the more "overhead" there will be to each "Sitecore query" has to look though all proxy items to see if there are any additional items that should be included in the result
Though this would copy all the items you choose to clone or proxy and might not be what you are looking to do.
I'm using CRE Loaded v6.2 B2B. It is a modified script of osCommerce.
In category page i see all the products with pagination. I want to add some dynamic text under each category. Text is unique for each category.
I should able to define the text from admin and it should display bottom of the category.
How to do this?
I mean which file i should edit? Is there any documentation available?
Thanks
There are many ways to achieve this. Probably the easiest is to add an extra text field in the category_description table. Then simply follow the trail of the category creation/editing/deleting process and add that field in the admin next to the other ones. Then you will be able to output the text dynamically on the front end of the store.
I have not used CRE Loaded in a long time, but this solution should still work.
I take it you mean to add the text in the categories listing?
There are two ways to do this, one is by editing the index.php and pulling in the category description as a blurb.
There other is to use CDS (content director system) in B2B to create custom page category listings which support blurbs and images and use the URL override to point to your product categories.