Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-08-16 19:34:06
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Gallerific with Current TXP image tags -- how to implement
So, I added the following code to my page (template):
<head> <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” /> <title><txp:page_title /></title> <link rel=“stylesheet” href=“src=”<txp:site_url />css/basic.css” type=“text/css” />
<link rel=“stylesheet” href=“src=”<txp:site_url />css/galleriffic-5.css” type=“text/css” />
<link rel=“stylesheet” href=“src=”<txp:site_url />css/black.css” type=“text/css” />
<link rel=“home” href=”<txp:site_url />” />
<script src=“http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>
<script src=”<txp:site_url />js/jquery.galleriffic.js”></script>
<script type=“text/javascript” src=”<txp:site_url />js/jquery.history.js”></script>
<script type=“text/javascript” src=”<txp:site_url />js/jquery.opacityrollover.js”></script>
<txp:feed_link flavor=“atom” format=“link” label=“Atom” /> <txp:feed_link flavor=“rss” format=“link” label=“RSS” />
<txp:css format=“link” />
<txp:rsd />
<script type=“text/javascript”>
document.write(‘<style>.noscript { display: none; }</style>’);
</script>
</head>
Both the css and js folder is created in the base of the textpattern install (but above the directory /textpattern/”) In my case, I want to use the 5th example of Gallerific, as shown here:
http://www.twospy.com/galleriffic/example-5.html
It lists the html div tags and all the info (which I assume I must modify with TXT Image Tags). However, the example page (and looking at Firefox’s View Source) puts the jquery stuff AFTER all of that. Is that the right order when applying this overall library to the TextPattern environment? Admittedly, Im a beginning user with jquery , but Im used to jquery doing calls BEFORE the html/php markup is generated
Offline
Re: Gallerific with Current TXP image tags -- how to implement
There’s been debate about the best place for your script tags in your output. For load speed they are often at the end of the page.
In Textpattern you can do it anyway you like, that’s the best thing about Textpattern.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#3 2011-08-16 20:02:04
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
Thanks for the response. Just want to see which is optimal — calling the jquery and html seperately and putting that call into the template (page in Textpattern) or if this is clean enough code as-is. :) Ill run some diagnostics in the end, I suppose
Last edited by WebmistressM (2011-08-16 20:04:13)
Offline
#4 2011-08-16 23:18:55
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
Would I need ot create a page (template) for every entry using category view or do I need to specify individual images in one category?
For example, my portfolio is being divided into 2 sections — Web Design & Graphic Art.
In Each, I will create an article for each item in my folio. That item’s individual page/article will use 1-3 images. Should each entry’s 1-3 images be in the same “web design” category (within images) or am I getting the taxonomy methods slightly inversed?
Offline
Re: Gallerific with Current TXP image tags -- how to implement
Would I need ot create a page (template) for every entry using category view or do I need to specify individual images in one category?
I like to create as few page templates as possible, and to keep (mind-numbing) duplication of code as minimal as possible.
You can run an entire site from a single page template if you want.
If you have 1-3 images in an article, and that article is in the “web design” section, then you can assign those images to an image category called “web design” if you want to. Nothing wrong with that. But categories aren’t required.
Personally I don’t use image categories for my own portfolio-type work — each article you assign several images becomes its own “category” or container in a way — so I don’t go to the trouble.
Offline
#6 2011-08-17 00:38:13
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
Yeah. In my case, I might be using a slightly different taxonomy due to me being in 2 related fields. So, Im not sure how well your method would work:
Section: Web Design (Needs Portfolio Layout)
>>>>>>>HTML Sites (2 articles)
>>>>>>> Templates and Themes (3 or so articles needed)
>>>>>>>PSD Conversions (2 entries)
Section: Graphic Arts (Needs Portfolio Layout)
>>>>>>>3D Work (4 projects)
>>>>>>>Vector (3 images)
>>>>>>>Pixel (6 images)
In other content management systems, one could set up Categories and sub-categories so I could kind of upload image content under the main category of “Images” but check a subcategory that was more specific. This helped when mapping out a setup like the above. Text Pattern seems a bit of a different animal so Im not sure my sub-category style of thinking works in this case.
Offline
Re: Gallerific with Current TXP image tags -- how to implement
You can nest categories in Textpattern, but in this case you could do without nesting, and just have six image categories.
BTW your site is easily doable with just one page template, like:
<body>
<txp:if_section name="web-design"><!-- OK, visitor is somewhere inside example.com/web-design -->
<txp:if_article_list /><!-- if we're on the section landing page example.com/web-design, not example.com/web-design/article-name -->
<!-- PUT PORTFOLIO LAYOUT STUFF HERE FOR SECTION LANDING PAGE, for examp;e: -->
<txp:images category="html-sites, templates-and-themes, psd-conversions"><!-- loop thru all imgs in these categories-->
<img src="<txp:image_url />" alt="<txp:image_info type="alt" />" /> <!-- show image and alt value -->
</txp:images>
</txp:if_article_list><!-- finished with content for section landing page. -->
<txp:if_article_id id="3"><!-- if we're NOT on the section landing page, and are viewing an article with ID of 3 (for example..could be any ID) -->
<txp:article>
<h1><txp:title /></h1>
<txp:if_article_image><!-- make sure images are assigned to article -->
<txp:images><!-- show all the images assigned to this article, NOTE you could also loop thru all images in this category, and forego the use of article_images -->
<img src="<txp:image_url />" alt="<txp:image_info type="alt" />" />
</txp:images>
</txp:if_article_image>
</txp:article>
</txp:if_article_id><!-- finished with content for article of ID 3 -->
<!-- you can put the other two article_id tests here; each article can have its own layout if needed -->
</txp:if_section>
<txp:if_section name="graphic-arts">
<!-- same pattern as above -->
</txp:if_section>
<txp:soo_if_frontpage><!-- this is a handy plugin, just determines if the front page of the site is being viewed -->
<!-- FRONT PAGE CONTENT -->
</txp:soo_if_frontpage>
</body>
I guess you’re using Gallerific, but this is just a general peek at how you might do the logic inside a page template. The content is up to you. :-)
Last edited by maruchan (2011-08-17 04:52:55)
Offline
#8 2011-08-17 04:51:33
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
Honestly, Im not married to Gallerific but I know the kind of look that I like for my gallery:
http://www.olsonkundigarchitects.com/Projects/1661/East-Village-Apartment
Logically, this gallerific setup is the closest to that:
http://www.twospy.com/galleriffic/example-5.html
Offline
Re: Gallerific with Current TXP image tags -- how to implement
Cool, then you already know what HTML your TXP tags need to generate.
Offline
#10 2011-08-17 05:03:09
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
Yeah. I believe that there was a textpattern site that I found useful. It let you convert textile to regular html. Doesnt do it in reverse so I suppose its only half useful in this instance:
http://textile.thresholdstate.com/
Offline
Re: Gallerific with Current TXP image tags -- how to implement
WebmistressM wrote:
http://textile.thresholdstate.com/
Do not know how that relates to your original question, but Alex’s site was the old home of Textile and that test page uses old version. For testing/converting see http://textile.sitemonks.com/, the testing facility of current Textile version.
Doesnt do it in reverse
Textile doesn’t offer reverse parser, it only has the functionality to generate HTML from the Textile syntax.
Offline
#12 2011-08-17 05:26:15
- WebmistressM
- Member
- Registered: 2011-08-12
- Posts: 61
Re: Gallerific with Current TXP image tags -- how to implement
I was talking more about the converter being used as a tool to take html markup (in case of my scenario, Gallerific’s example html pages for various gallery layouts) and adapt the codes back and forth (between html and textile, as well as vice-versa).
Obviously, using a converter to take html markup and view it in textile would help verify, IMHO, but this link you have provided is close enough.
Offline