Problems with Galleries
Permalinki'm pretty new to concrete5 but i really love how it works.. i did one website yet and am actually working on the second.
here the link to the actual one i'm working on:
http://chriisi.dyndns.org/bediff...
EDIT:the site is strangely not working if you dont login.. i added screenshot so you get a picture of the site
well, as you see you have two navigations, one for content and one for the galleries. i can load all the content perfectly via ajax and it will just update my content-div.
anyhow: i tried the same procedure with the galleries, but since i had some problems loading the right javascripts which the gallery blocks used, i forgot about that approach.
now, i kind of started over again. the gallery-navigations is now create through a loop over the existing filesets.
<nav id="nav_gly"> <?php Loader::model('file_set'); $filesets = FileSet::getMySets($user = false); ?> <ul> <?php foreach ($filesets as $fset) { echo "<li><a href='#' name='".$fset->getFileSetName()."'>".$fset->getFileSetName()."</a></li>"; } ?> </ul> </nav>
then i have a jquery listener:
$("#nav_gly a").live("click",function() { var glyName = $(this).attr("name"); var pageToLoad = "/bediff/themes/bediff/scripts/gallery.php"; $.get(pageToLoad, {"param":glyName}, function(data){ $("#gallery").html(data); }); return false; });
so, this is working fine so far and i get into the php-script and get the actual fileset i clicked and therefore want to show later..
BUT: my gallery.php won't work if i add
and always returns ACCESS DENIED.. and that's because i can't use any C5-Loaders and Stuff (Loader::model('file_set');)..
Has anyone a good idea or a better solution to work around my problem?
it is already very well appreciated! ;)
cheers chrisi
Try a wonderful (free) module Sortable Fancybox Gallery -http://www.concrete5.org/marketplace/addons/sortable-fancybox-galle...
It comes very easy to handle galleries related to a file set.
Then create a page "Gallery" and every time you create a new gallery it's a new child page with it's own URL.
Then it's easy to use autonav or pagelist to create a navigation which lists every galleries below Gallery and you can access them with their native C5 url. You can also add a thumbnail (custom attribute) to the page if needed.
Last step is to set the default view (in the Page types) with placeholder content and add the Page type to the Composer for an easy editing. Then you have a solid as rock gallery system.
the only problem i'll probably face: i have to load all the stuff via ajax, and if i tried to load galleries via ajax, i had major issues loading the javascript rightly (as i can recall, it's because the blocks mostly put their js-calls in the head and you won't get it if you just try to load a certain div in the body..
http://www.concrete5.org/marketplace/addons/blocks-by-ajax/forums/b...
You can also use block actions.
See my AJAX Lessons Howto and associated addon for examples. Its getting a bit dated, but the principles remain valid.
so that means i can put it under /root/tools or /root/concrete/tools..
well, i tried it.. but i still get the same ACCESS DENIED.. probably i have to call it differently?!
i'll take a look at your ajax-lessons.. thanks!
/root/tools/
or
/root/packages/package_handle/tools/
Never put anything of your own or changes within
/root/concrete !!!!
well, i just bought the blocks by ajax and will try to use it with the galleria gallery.. i'll ask u if i need any support!
thanks again!
http://chriisi.dyndns.org/bediff/...