Lucas,
If you're willing to share your extension, why don't you put it in GitHub?
I'll surely be interested in it...
Thanks and regards,
Sergio
Nope, com_tags displays all of the items that share the same tag, besides you cannot manage your items displaying as you whish since they are treated in the com_tags component.The tag view feature displays only your component items that share the same tag in a tag blog/list layout. And you can manage your items as you would with a category blog/list
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.
Yes, I understand what your objective is, and I share your vision (a "Tag Blog" view can be very useful, I agree!), but I suppose you implemented it as separate views that complement current com_content views, without patching them (you know, the "a kitten will die" thing...).
If this is the case you could publish them separate from the core
and everybody could "insert" them as com_content "add-on.
Yes, it will not be an "extension" in the classical terms,
but a "common playground" to experiment and appreciate the
value of your proposal.
As an alternative you can propose your mods as a PR for an upcoming new Joomla release. This will be a little bit tougher, I guess.
Keep also in mind that next minor release (3.6) is targeted to include the new "custom fields" feature, so I think your mod should also take this aspect into account.
Regrads,
Sergio
"I'm saying- It adds a tag option to Category Blog, Category list menu item types to display blog/list by tag regardless of category"That would be a bit confusing because the Category Blog, Category list menu item types have an option to select a category. So to have an option that overrides the selected category would be contradictory.
Ah, sorry, I thought you were familiar with the term!
A PR is a "Pull Request", that is your request for your code to be "merged" into Joomla core.
This is done through the usage of the "Git" source code management system hosted on GitHub (https://github.com/joomla/joomla-cms).
There are several pages scattered around in Joomla documentation
describing how this is accomplished, like, e.g.:
There are probably others too and I'm unsure, at this point,
which one should be considered more "authoritative".
What does PR mean ?
I was confused about the PR. I thought it ought to be "Push Request" instead of "Pull Request -- sort of like the put() and get() functions. But, I now think of a PR as a Request to Pull the New Stuff into the Core -- and it makes more sense. So, I will Push it (upload it to GitHub) and request that the "Powers to be" Pull it into the core with a PR.."
"For how to display them, that's what overrides are for. But yes, there com_tags is a bit lacking. Ideally it would optionally call a JLayout for each content type to render it in"
No you can't.
You can have the equivalent of "Category List" by using "Tagged Items", but there is no equivalent of "Category Blog".
It is quite obvious if you think it over a second: all "Tag" views are, by definition, com_tags views (and they can apply to whatever object of whatever nature from whatever component that supports tags), so they have no knowledge of the nature of the items they are listing.
Can you see all the com_content item related options (e.g. "Show Author", "Show Voting", "Show Intro Text", etc.) we have in "Category Blog" in "Tagged Items"? I can't.
Of course in your override you could re-implement all the com_content logic (and options) to have those, but it will be a monster override.
If the view shows content it belongs to com_content, not com_tags, the same way "Category Blog" belongs to com_content and not com_categories.
--
I have nothing against JLayouts, to the contrary! :-)
But you haven't addressed the issue of where the options for those JLayout will be set.
Tags are a kind of taxonomy, exactly same as categories.
Taxonomies should be used by components for filtering content (of whatever nature).
Content views belongs to their respective components.
As always one example is far more clear than a thousand of explanations so here is a link to a demo website:
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-cm...@googlegroups.com.
To post to this group, send email to joomla-...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-cms.
For more options, visit https://groups.google.com/d/optout.
That would be great. The component or the whole Joomla
installation, without DB, so we can check if anything else was
modified and what your base Joomla version is.
You could do that by cloning it into a GitHub repo or, if you're
not familiar with that, putting it into a publicly shared
Dropbox/GoogleDrive/OneDrive folder.
If you wish I could then put it into a GitHub repo.
Regarding the pull request I need time to set it up and I'm quite busy these days.Meanwhile, if you're interested, I can post the SongBook component and its plugin for you to download.
Thomas,
I'm really sorry you're insisting that it can be done "your way": yes, it can. Everything can be done, but will it be good architecture? Not at all!
Just to make myself clear, when I was talking about "monster
override" I wasn't referring to the "size" of the
override but to its "nature" as it will be a freak one
totally breaking the MVC paradigm.
The options for the JLayout would have to be taken from the global component settings for obvious reasons. Maybe some generic ones can be done in com_tags and it's menu item, overriding the component ones.
Tags were meant to create a system of cross-extension filtering. They are not really designed to filter extension content.
Look at the database structure and you see what I mean. You will have to join over several tables to filter your items by a specific tag :)
No I haven't looked, but I suppose this is what all current "Tags" views are doing, right?
"Imho, com_tags has to deal with tags and it already has the needed data. The only missing part is that it doesn't know how to render an item"
"Using content type specific JLayout provided by the extension we would be able to solve this in a nice way"
"The menu item type is created automatically if you create an XML file with the same name as the layout. Eg copy the existing default.xml file and adjust it"
"However I'm not sure you need a new view. I think it should work with a layout for the existing tag view"
But it needs to display on a screen in the same format as Featured/Category Blog. Surely creating a new view is better than editing an existing com_tags view to display differently ?
e.g.
As well as
/components/com_tags/views/tag/tmpl/default.php
and
/components/com_tags/views/tags/tmpl/default.php
have
/components/com_tags/views/tagblog/tmpl/default.php
"A new view is only needed if you want to deal with different data. But you're going to use the same data as in the tag view but in a different design. Then it's just another layout for the tag view."
"The Category List and Category Blog are both layouts of the same view. For the user, it doesn't matter at all if it is an own view or just a different layout of the same view. He will just see two menu item types that he can choose. :)"
"The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view."
"The Category List and Category Blog are both layouts of the same view. For the user, it doesn't matter at all if it is an own view or just a different layout of the same view. He will just see two menu item types that he can choose. :)"Yep ... just had another look and now see what you mean"The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view."
- How difficult would that be to achieve ?
- Would the result be worth the effort of doing it ?
- Or is it better to leave it to 3rd party extensions to achieve the same result ?
On Tuesday, 3 May 2016 22:01:41 UTC+1, Bakual wrote:The Category List and Category Blog are both layouts of the same view. For the user, it doesn't matter at all if it is an own view or just a different layout of the same view. He will just see two menu item types that he can choose. :)The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view.
Am Dienstag, 3. Mai 2016 22:43:44 UTC+2 schrieb Webdongle Elgnodbew:"A new view is only needed if you want to deal with different data. But you're going to use the same data as in the tag view but in a different design. Then it's just another layout for the tag view."I understand what you are saying but I think you missed the point from a users angle ?
Because if another view is added then it would compare too Category List and Category Blog ... but if it was just a different design (of the same view) then it would be like editing the Category Blog view to also be able to be configured like a Blog. Besides which to display a Blog view based on Tags would require more data than the /views/tag/ and /views/tags/ currently use ... wouldn't it ?
On Tuesday, 3 May 2016 21:17:30 UTC+1, Bakual wrote:But it needs to display on a screen in the same format as Featured/Category Blog. Surely creating a new view is better than editing an existing com_tags view to display differently ?
e.g.
As well as
/components/com_tags/views/tag/tmpl/default.php
and
/components/com_tags/views/tags/tmpl/default.php
have
/components/com_tags/views/tagblog/tmpl/default.phpA new view is only needed if you want to deal with different data. But you're going to use the same data as in the tag view but in a different design. Then it's just another layout for the tag view.
--
Kevin,
If you want to implement it "the wrong way" you might be
interested in this:
http://joomla.stackexchange.com/questions/13583/how-to-show-tagged-items-in-category-blog-layout
Then, you could also answer to this (irony intentional...):
Please, also not that this "Tag Blog" idea seems to be an idea
proposed some time ago, but apparently royally ignored...
"The Category List and Category Blog are both layouts of the same view. For the user, it doesn't matter at all if it is an own view or just a different layout of the same view. He will just see two menu item types that he can choose. :)"Yep ... just had another look and now see what you mean
"The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view."
- How difficult would that be to achieve ?
- Would the result be worth the effort of doing it ?
- Or is it better to leave it to 3rd party extensions to achieve the same result ?
On Tuesday, 3 May 2016 22:01:41 UTC+1, Bakual wrote:The Category List and Category Blog are both layouts of the same view. For the user, it doesn't matter at all if it is an own view or just a different layout of the same view. He will just see two menu item types that he can choose. :)
The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view.
Am Dienstag, 3. Mai 2016 22:43:44 UTC+2 schrieb Webdongle Elgnodbew:"A new view is only needed if you want to deal with different data. But you're going to use the same data as in the tag view but in a different design. Then it's just another layout for the tag view."I understand what you are saying but I think you missed the point from a users angle ?
Because if another view is added then it would compare too Category List and Category Blog ... but if it was just a different design (of the same view) then it would be like editing the Category Blog view to also be able to be configured like a Blog. Besides which to display a Blog view based on Tags would require more data than the /views/tag/ and /views/tags/ currently use ... wouldn't it ?
On Tuesday, 3 May 2016 21:17:30 UTC+1, Bakual wrote:But it needs to display on a screen in the same format as Featured/Category Blog. Surely creating a new view is better than editing an existing com_tags view to display differently ?
e.g.
As well as
/components/com_tags/views/tag/tmpl/default.php
and
/components/com_tags/views/tags/tmpl/default.php
have
/components/com_tags/views/tagblog/tmpl/default.php
A new view is only needed if you want to deal with different data. But you're going to use the same data as in the tag view but in a different design. Then it's just another layout for the tag view.
--
Too bad, because amongst some strange and unfeasible ideas there are also some "gems", like this one, IMHO.
If you read the comments to the "Tag Blog" idea there is one which I think is very spot on:
This is exactly what i'm looking for.
When i heard, joomla 3.x comes with an integrated tag-component, i thought this would be the main function.
Since today i'm looking for another way to get this feature to my website.
I hope you notice this featuere and update this function.It would be the easiest way to show every content (and the other components) of one basic tag without category limitation
hacking core files with the PLT blessing is not hacking any more!
and if I'm not mistaken the one I pointed to is exactly Bakual's
idea...
Chad,
Actually it was Kevin, not me, who asked for you to push a PR,
but I'll be anyway curious to give a look at it...
Thanks! :-)
If not by adding to an existing com_tags view or creating another com_tags view ... how would you do it ?
Simple: like we do for every other com_content view.
The model could use JHelperTags::getTagItemsQuery() to select the
relevant items.
Absolutely. That's what I'm repeating since the beginning.
Also keep in mind that:
Even more (just ideas buzzing in my mind...):
Absolutely. "That's what I'm repeating since the beginning"
No problem, Kevin: English not being my native language I probably didn't express myself clearly.
Answering to your questions:
1. Not much, I guess, if done by an experienced Joomla core developer.
2. I'm not an experienced Joomla core developer. I may have vision, but I will be overwhelmed by the task of maintaining consistence with all the legacy code, so I don't see myself fit to the job, unhappily. I could try, if helped with the right experienced guidance, but the process will take a lot longer, I'm pretty sure.
"I'm not an experienced Joomla core developer. I may have vision, but I will be overwhelmed by the task of maintaining consistence with all the legacy code, so I don't see myself fit to the job,"
Hello everyone,
I'm a web developer and I've worked with Joomla for over 5 years.
Recently I set up a kind of generic component (an Hello World component like) which I use as a starting point whenever I have a new component to develop for a client.
This component has the Joomla standard functionalities (create/edit items etc...) but I've added to it a new feature.
Indeed, it's been a while that I've been stuck with the "multicategories problem" without finding out a real solution.
Most of the time I end up with a CCK (flexicontent, seblod) which is a far more complex and heavy solution compare to my initial needs.
So I decided to add a tag view to my component which displays (in frontend) all the component items labeled with the same tag in a blog or list layout.
Now the "multicategories problem" can be considered as solved since tags allow an even better flexibility regarding the item sorting (taxonomy).
So I was wondering if the Joomla core team would be interested in adding this feature to the framework.
In doing so the Joomla's users would be definitely freed from this "multicategories problem" and could organize and display their articles the way they want to.
Don't hesitate to ask for further informations.
I can send you a demo for you to see what this tag view feature looks like.
Regards
Lucas Sanner
Hi Kevin!
Hi Sergio
Given
"I'm not an experienced Joomla core developer. I may have vision, but I will be overwhelmed by the task of maintaining consistence with all the legacy code, so I don't see myself fit to the job,"
Then what makes your approach the 'most correct' method technically ?
and
As you can't do it then how can you be confident it can be done that way ?
Not a personal attack because I admit that I'm not qualified to say which method is technically correct. But as an end user ... having the new menu item type for the view in com_tags or com_content makes sense to me either way.
I hope you find the above points valuable.
Regards,
Sergio
oops... read: "like a content view menu item popping out in an unexpected place"
"The blog view may need more data than is present in the tag view. But it may even be missing in the UCM tables. Which means we would first have to add it there and after that we could add it easily to the tag view."
- How difficult would that be to achieve ?
- Would the result be worth the effort of doing it ?
- Or is it better to leave it to 3rd party extensions to achieve the same result ?
You're welcome Kevin.
On a personal note I would like to tell you that I like the way
you don't "give things as granted" and you listen to your
guts!
--
Thomas,
what's wrong with using JHelperTags::getTagItemsQuery()?
Once you have the content items IDs, which you get from JHelperTags::getTagItemsQuery(), wouldn't it be enough to run a second query on the content table (c) with
where('c.id IN (' . implode(',', $ids_from_tags) . ')');
?
My answer was about possible ways to get data which isn't stored in the UCM tables (eg the address from a contact).So for com_tags, this doesn't give us more data than what is already available in the tag view.
... because "we want" (and sorry if I'm mis-interpreting)
a view for com_content where we can set the very same display
options we can set for "Category Blog"
Hi Kevin!
Hi Bakual
My answer was about possible ways to get data which isn't stored in the UCM tables (eg the address from a contact).So for com_tags, this doesn't give us more data than what is already available in the tag view.
From what I am understanding is that adding a view to com_content doesn't suffer that problem because the required data already exists there. The data displayed is Content not Tags therefore
With #1 ... All the data is already fetched and displayed in Category Blog ... the only difference is that the selected will have an extra IF criterion to match a Tag value(s)
- It makes sense to display via com_content and filter by Tag
- Not to display via com_tags and filter by Category
but
With #2 ... A significant amount of rewriting com_tags would be needed.
@Sergio
Is that similar to what you are saying ?
"When you create a new menu item just choose: SongBook->Tag Blog or SongBook->Tag List in the popupthan you'll see that it asked you to select a tag not a category."
I've never intended to impose a new component. The purpose of the Songbook component is just to show howthe tag view feature work.
To sum it up (and I ask Thomas to correct me if I'm wrong), I think we have two proposal on the table based on different philosophies and each with its own merits/limitations.
"That's true, com_content wouldn't need the additional data from com_content for obvious reasons. By the way, it wouldn't need a new view there as well. What you want is adding a filter to the existing category view (blog and list layouts)."
"The downside here is that this will only show items from com_content, while com_tags can show all tagged items regardless of extension"
Another proposal (which I can't say it's "mine", but which I "champion"), which will copycat "Category Blog", will be limited to com_content items (but keep in mind that customs fields are on their way...), but on the other hand will give more display options for displayed items: the same we currently have for "Category Blog"
Of course I agree, but I want to recognize Thomas proposal its
merit: if it could achieve displaying content of mixed origin (different
components) in the same page it would be really
interesting...
Yes, you're right: the two proposal are not mutually exclusive and there are good scenarios for both.
That said and with the standard caveat (I'm not a core
developer), I think filtering for tagged items within a
single component (com_content in our case) would be much
easier to implement and could be a good programming example for
other components developers wishing to include that functionality
in their extension.
"com_tags if you are creating a multi-component type view. Otherwise you'd be trying to teach com_content how to render data for other components that it doesn't already have awareness of.Ya, I know earlier you said this isn't a good idea (articles should only be rendered with com_content). As is, that's not the case today. Both search components can render standardized snippets of articles (and newsfeeds, weblinks, etc.) already so the same kind of concept would apply in com_tags if a view which could render all content items (regardless of "owning" component) was created."
A couple of questions for Thomas:
Thanks!
Hi Thomas,
Ordering is done the same as for the current tag view layouts. The layout doesn't do anything with that, that's the model who decides on that. The layouts just display the data the way it is given to them.
I would follow the way we have in other places as well. Take both and merge them, giving precedence to the item options.
There will be no unexpected side effects at all since it's just a regular layout file for a tag view. Routing will be the same like in the other layouts of the same view.
Michael,
I'm T_R_Y_I_N_G to do something along that lines, but the first conceptual obstacle I'm facing is that if I'm going to introduce a new specialized model/view for selecting com_content items based on tags, then I should also write a router for that, right?
It could be something like:
but the problem is, how can I do that if I'm willing to handle multiple tags?$link = 'index.php?option=com_songbook&view=tag&id='.$id;
oops... com_songbook comes from Lucas component, in our case it
would be com_content, of course! :-)
Does this commit:
https://github.com/joomla/joomla-cms/commit/80f110eca925eca629a05b50555936bfc094ac69
have something to do with our issue?
I can't find a corresponding PR/Issue on GitHub... Is this
normal?
Dont know
Download the zip from staging https://github.com/joomla/joomla-cms and install on localhost and check
will do... tomorrow... (no need for downloading I have my
local GitHub clone kept in sync with staging...)